FAXES
March 24, 2018, 8:58am
1
Hi trying to find out how to add ace perms into a script. So when you run a command it would check for ace perms to run it.
How could I do this?
The principle identifier I have now is :
add_principal identifier.steam:110000112345678 fax.admin
Is that right for the permission and now I just need to put it in the script itself?
Put the add aces in the server.cfg
then use…
RegisterCommand("addadmin", function(source, args, rawCommand)
end, true)
The bool true or false in the end means: A flag that sets whether the command can only be ran by people with permission (true) or by everyone (false). Permissions are set in the config with the use of “add_ace”
https://wiki.fivem.net/wiki/RegisterCommand
or use this native: https://runtime.fivem.net/doc/reference.html#_0xdedae23d
FAXES
March 24, 2018, 1:48pm
3
Thanks for the help.
So I can change what currently is
if message:sub(1) == '/svr 10' then
Into
RegisterCommand("fax.admin", function(source, args, rawCommand)
TriggerClientEvent("chatMessage", -1, " My Msg to server")
and have the add_principal identifier.steam:110000112345678 fax.admin in the server.conf?