Skip to content

Instantly share code, notes, and snippets.

@cm8263
Created September 9, 2019 07:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cm8263/6b6a4b977a20d85114845144b83c1729 to your computer and use it in GitHub Desktop.
Save cm8263/6b6a4b977a20d85114845144b83c1729 to your computer and use it in GitHub Desktop.
-- Whitelist check on server join
RegisterServerEvent("Whitelist:WhitelistCheck")
AddEventHandler("Whitelist:WhitelistCheck", function(Whitelist)
-- Loop through all whitelist entries
for i in pairs(Whitelist) do
-- Grant player permission to command based on Ace group
Whitelist[i] = IsPlayerAceAllowed(source, "whitelist." .. i)
end
-- Return whietlist object to client
TriggerClientEvent("Whitelist:Return:WhitelistCheck", source, Whitelist)
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment