Exports
Permissions
isPlayerIdAllowed
exports.lc_adminmenu:isPlayerIdAllowed(targetId, permission)targetId:
numberpermission?:
string- Optional. If permission name is not defined, function just checks if player with given ID is an admin.
Returns: boolean
-- Command that checks if player has permission to revive
-- Example Input: isPlayerIdAllowedToRevive 2
-- Example Output:
-- Check passed! Player with ID 2 is administrator
-- This administrator has permission to revive.
RegisterCommand('isPlayerIdAllowedToRevive', function(source, args)
if source ~= 0 then return end -- Command can be only used from console
if not args[1] or not tonumber(args[1]) then return end -- Argument validation
local allowed = exports.lc_adminmenu:isPlayerIdAllowed(args[1])
if not allowed then
print('This player is not an admin.')
return
end
print(('Check passed! Player with ID %s is administrator'):format(args[1]))
-- You can also check if player has any permission from data/permissions.lua
local revive_allowed = exports.lc_adminmenu:isPlayerIdAllowed(args[1], 'revive')
if revive_allowed then
print('This administrator has permission to revive.')
else
print('This administrator DOES NOT have permission to revive.')
end
end)Ban System
banPlayer
Parameters:
targetId:
number- ID of player you want to banreason:
string- Ban reasonduration:
number- In seconds, -1 for permament bandisconnect?:
boolean- Optional, if it's set to false - the player can continue the game, but will not be able to join the server next time
checkIsPlayerBanned
Parameters:
identifiers:
tablediscord:
stringsteam:
stringlicense:
stringxbl:
stringlive:
string
unbanIdentifier
This function will delete ALL BANS associated with given identifier.
Parameters:
any_identifier:
string- discord / steam / license / xbl / live (with prefix: discord:000000 etc.)
Dashboard Feed
addFeedMessage
Parameters:
feed_message:
tabletitle:
string- Message titlecontent:
string | string[]- Message contentavatar_url?:
stringtimestamp?:
number- Optional, Epoch Unix Timestampserver_id?:
number- If specified - clicking on the feed message will open user's pagereport_id?:
number- If specified - clicking on the feed message will open report page
Example usage:

Trust Score
getTrustScoreById
Parameters:
targetId:
number
Returns: number
setTrustScoreById
Parameters:
targetId:
numberamount:
number
Returns: number
addTrustScoreById
Parameters:
targetId:
numberamount:
number
Returns: number
removeTrustScoreById
Parameters:
targetId:
numberamount:
number
Returns: number
Last updated