State Bags
Player State Bags
isStaff
A state bag attached to each player set to true if the player is staff and to false if it isn't
local isPlayerStaff = LocalPlayer.state.isStaff -- client side
local isPlayerStaff = Player(source).state.isStaff -- server side
print(isPlayerStaff) -- true/false
isAllowed
A state bag attached only to the staff members in the server, set with a table that contains status of all staff commands and if the player can use them or not
local allowedCommands = LocalPlayer.state.isAllowed -- client side
local allowedCommands = Player(source).state.isAllowed -- server side
print(json.encode(allowedCommands, { indent = true }))
--[[ Return format
{
removeStaff = true/false,
setStaff = true/false,
adminmenu = true/false,
['goto'] = true/false,
bring = true/false,
ban = true/false,
unban = true/false,
tpm = true/false,
emergency = true/false,
setJob = true/false,
setMoney = true/false,
spawnVeh = true/false,
warn = true/false,
freeze = true/false,
kick = true/false,
delAll = true/false
}
]]
group
A state bag attached only to the staff members in the server, set with the current player's group
local playerGroup = LocalPlayer.state.group
local playerGroup = Player(source).state.group
print(playerGroup) -- string
Last updated