-
-
Save cm8263/6b6a4b977a20d85114845144b83c1729 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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