โ Commands
A list of all the commands and their respective resource
RSGCore.Commands.Add
This function allows you to register a command with a specified user level
RSGCore.Commands.Add(name, help, arguments, argsrequired, callback, permission, ...)
-
name:
string
-
help:
string
-
arguments:
table
-
argsrequired:
boolean
-
callback:
function
-
permission:
string
Example:
local arguments = {
{ name = 'arg 1', help = 'This will give helpful hints on what arg is for' },
{ name = 'arg 2', help = 'This will give helpful hints on what arg is for' }
}
local argsRequired = true -- if this is true the command won't work without args entered
RSGCore.Commands.Add('test', 'Trigger a test command', arguments, argsRequired, function(source)
print('Congrats, you made a test command that anyone can trigger!')
end, 'user')
RSGCore.Commands.Refresh
This function will trigger a refresh of all commands suggestions. This is helpful for when setting permissions to a higher level, it will refresh the suggestions list so the player can now see the new commands they have access to!
RSGCore.Commands.Refresh(source)
- source:
number
Example:
RegisterCommand('refreshCommands', function()
RSGCore.Commands.Refresh(source)
print('You have refreshed all command suggestions for yourself')
end, true)
AdminMenu
Teleports you to either a player with the given id
or to a given x, y, z
location
Permission level: admin
-
id or x - (required) The player id or x coordinate
-
y - (optional) The y coordinate (required if using x for the first argument)
-
z - (optional) The z coordinate (required if using x for the first argument)
Teleports you to the marked location on the map.
Permission level: admin
Allows you to fly around the map.
Permission level: admin
Toggles Player vs Player mode on the server
Permission level: admin
Toggles Player vs Player mode on the server
Permission level: admin
Removes the given permission
from the player with the given id
. The player must be online.
Permission level: god
Opens the server allowing everyone to join.
Permission level: admin
Closes the server for people without the correct permission. Kicks any players currently online without the required permission giving the reason
in the kick message.
Permission level: admin
Spawns a wagon of the given model
type.
Permission level: admin
Spawns a wagon of the given model
type.
Permission level: admin
Deletes the vehicle you are sitting in or deletes all vehicles within 5.0 units of your position.
Permission level: admin
Gives money to a player
Permission level: admin
-
id - (required) The
id
of the player -
type - (required) The money type [cash, bank etcโฆ]
-
amount - (required) The amount to give
Sets the amount of money a player has.
Permission level: admin
-
id - (required) The
id
of the player -
type - (required) The money type [cash, bank etcโฆ]
-
amount - (required) The amount to set
Displays your current job name and grade
Permission level: user
Displays your current job name and grade
Permission level: user
Displays your current gang name and grade
Permission level: user
Sets a player with the given id
to be part of the given gang
with the given grade
Permission level: admin
-
id - (required) The
id
of the player -
gang - (required) The gang name
-
grade (required) The gang grade
Sets a player with the given id
to be part of the given gang
with the given grade
Permission level: admin
-
id - (required) The
id
of the player -
gang - (required) The gang name
-
grade (required) The gang grade
Give An Item to player
Permission level: admin
-
id - The id of a player
-
item - The itenm of shared/items.lua
-
amount - (optional) The amount item receive of a player
Give Random Items
Permission level: god
Reset the inventory of type and id/plate (ID of stash or license plate)
-
type - The type of stash / trunk / glovebox
-
id - The id of stash or license plate
Permission level: admin
Notify you of your server ID
Permission level: user
Notify you of your citizen ID
Permission level: user
Stealing between players, when the target has his hands raised
Permission level: user
Refresh Skin player
Permission level: user
Access to the menu of components, materials and engravings
Permission level: admin
Access to the info of weapon
Permission level: admin
Refresh Skin wepaon player
Permission level: user
Opens Address book for player
Permission level: user