Você está tentando restringir um comando, por padrão usa-se false no terceiro parâmetro. Isso significa que o comando só será liberado se a ACL do jogador estiver explícito que ele tem tal permissão, caso contrário negará o comando. Se você deixar como true, ele vai sempre permitir o comando exceto se estiver explícito na ACL do jogador que ele não tem essa permissão, neste caso o comando se torna vulnerável, para quem não está explícita a permissão de nenhum jeito.
if hasObjectPermissionTo (thePlayer, "command.ban", false) then
No seu exemplo, poderia adicionar uma condição de escape, informando o jogador que ele não tem essa permissão. Geralmente é recomendável dar feedback ao jogador depois que ele usa comandos, senão ele pensa que simplesmente digitou o comando errado e fica tentando novamente sem sucesso.
Eu faria assim:
addCommandHandler ("camhack", function (thePlayer)
if hasObjectPermissionTo (thePlayer, "command.ban", false) then
if isPedInVehicle (thePlayer) then
if getVehicleOccupant (getPedOccupiedVehicle (thePlayer)) ~= thePlayer then -- Aqui não entendi seu objetivo. Sempre será true.
if getElementData (thePlayer, "isPlayerInCamHackMode") then
setElementAlpha (thePlayer, 255)
setPlayerCamHackDisabled (thePlayer)
else
setElementAlpha (thePlayer, 0)
setPlayerCamHackEnabled (thePlayer, false)
end
end
elseif getElementData (thePlayer, "isPlayerInCamHackMode") then
setElementAlpha (thePlayer, 255)
setPlayerCamHackDisabled (thePlayer)
setElementFrozen (thePlayer, false)
setElementCollisionsEnabled (thePlayer, true)
else
setElementAlpha (thePlayer, 0)
setPlayerCamHackEnabled (thePlayer, true)
setElementFrozen (thePlayer, true)
setElementCollisionsEnabled (thePlayer, false)
end
else
outputChatBox ("Acesso negado.", thePlayer, 255, 0, 0)
end
end)
addCommandHandler ("camhackm", function(thePlayer)
if hasObjectPermissionTo (thePlayer, "command.ban", false) then
isSlowCamHack = not isSlowCamHack
else
outputChatBox ("Acesso negado.", thePlayer, 255, 0, 0)
end
end)