Try taking a look at these.
Heres an example of the code, just put it into one of your commands
Server.lua
RegisterCommand("cmd", function(source, args, rawCommand)
if IsPlayerAceAllowed(source, "fax.cmds") then
TriggerClientEvent("chatMessage", source, "Output message! Permissions passed!")
else
TriggerClientEvent("chatMessage", source, "^1Insufficient Permissions.")
end
end)
So the
The if IsPlayerAceAllowed(player, "fax.cmds")
is the start you need to have. Also, include an else
so people that don’t have the perms will get that other event. In this case, it refers to the client.lua which has an event in it. And of course, make sure there is an end
.
This is for ace perms so than in the server config for this script to work you need:
add_ace group.admin fax allow # allow all commands for FAXES Script admins
add_ace group.moderator fax allow # allow all commands for FAXES Script moderators
add_ace group.moderator fax.cmds deny # disallow FAXES Script Perms for moderators
add_principal identifier.steam:HEX-ID-HERE group.admin
Hope this helps.