-
Notifications
You must be signed in to change notification settings - Fork 6
Functions
Here are the functions that are provided with xAdmin
Desc: Used to register a new group
Arguments:
Arguments | Type |
---|---|
name | string |
power | integer |
Desc: Used to get a group's power
Arguments:
Arguments | Type |
---|---|
name | string |
Returns:
Name | Type |
---|---|
power | integer |
Desc: Used to get a table of groups that meet the provided power
Arguments:
Arguments | Type |
---|---|
power | integer |
Returns:
Name | Type |
---|---|
groups | table |
Desc: Used to register a new command
Arguments:
Arguments | Type |
---|---|
command | string |
desc | string |
power | integer |
func | function |
Desc: Used to check if the provided string is the name of a command
Arguments:
Arguments | Type |
---|---|
command | string |
Returns:
Name | Type |
---|---|
iscommand | boolean |
Desc: Used to get a user from a provided string
Arguments:
Arguments | Type |
---|---|
string | string |
admin | player |
Returns:
Name | Type |
---|---|
target | player or nil |
Desc: Used to get an SteamID64 from a provided string
Arguments:
Arguments | Type |
---|---|
string | string |
admin | player |
Returns:
Name | Type |
---|---|
target_id | string or nil |
target | ply or nil |
Desc: Used to update a target's usergroup in the database (Does not automatically update their realtime rank if they're currently online)
Arguments:
Arguments | Type |
---|---|
targetid | string |
rank | string |
Desc: Used to get a target's group straight from the database
Arguments:
Arguments | Type |
---|---|
targetid | string |
callback | function |
Desc: Adds an active ban to the databases (This will not kick the user if they are currently in-game). When providing the banend
, it should be how many seconds they are banned for.
Arguments:
Arguments | Type |
---|---|
targetid | string |
username | string or nil |
adminid | string |
adminname | string or nil |
reason | string or nil |
banend | int |
Desc: End an active ban
Arguments:
Arguments | Type |
---|---|
targetid | string |
Desc: Check if the provided id is banned
Arguments:
Arguments | Type |
---|---|
targetid | string |
callback | function or nil |
Desc: Used to format a table of words into arguments
Arguments:
Arguments | Type |
---|---|
words | table |
Returns:
Name | Type |
---|---|
words | table |
Desc: Used to send a chat message
Arguments:
Arguments | Type |
---|---|
args | table |
target | player or nil |