A simple example of "bindKey", when you press a key that you put inside the "bindKey", it will execute, when executing it will check if the player is inside the ACL Admin or Group you exist that you want to put.
Example:
local key = "b"
local statePress = "down"
addEventHandler("onResourceStart", resourceRoot, function()
for i, players in ipairs(getElementsByType("player")) do
bindKey(players, key, statePress, checkGroupACL)
end
end)
function checkGroupACL(player, key, state)
local account = getAccountName(getPlayerAccount(player))
if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then
print("Yes, it's inside the 'Admin' ACL")
else
print("Error, not inside ACL 'Admin'")
end
end