meu objetivo é que apenas players na Acl STAFF possam dar o comando /carros, alguém pode me ajudar ?
function limpa (jog,cmdo,distancia)
local acc = getPlayerAccount (jog)
if isObjectInACLGroup ( "user." ..getAccountName(acc), aclGetGroup ( "Staff" ) ) then
for _,carro in ipairs (getElementsByType('vehicle')) do
local px, py, pz = getElementPosition (jog)
local cx, cy, cz = getElementPosition (carro)
local distanciaC = getDistanceBetweenPoints3D (px, py, pz, cx, cy, cz)
if (distancia == nil ) then
if (distanciaC < 100) then
destroyElement (carro)
end
elseif ( distanciaC < tonumber(distancia)) then
destroyElement (carro)
end
end
else
outputChatBox ( "#000000[#ff0000Você não é da staff#000000] !", jog, 255, 0, 0)
end
addCommandHandler ('carros', limpa)
fileDelete()