Jump to content

Carro com ACL


Recommended Posts

Seguinte eu quero colocar pra apenas uma ACL conseguir pegar o carro, mas quando eu adiciono o comando da acl o script não funciona. Se eu retirar o comando por ACL ele funciona normalmente
Quote

 

local Veiculos = {533} -- IDs dos Veiculos.
zikatop = {}

function CreateVehicle1 (source)
if getElementData (source, "Pegou", true) then outputChatBox ('#000000[ #9a00c1PRIVADO #000000] - #FFFFFFAguarde #FF730020 #FFFFFFsegundos para pegar novamente.',source,255,255,255,true) return end
if isElement(zikatop[source]) then destroyElement (zikatop[source]) 
zikatop[source] = nil
end
local x,y,z = getElementPosition (source)
local Cars = Veiculos[math.random(#Veiculos)]
local accName = getAccountName ( getPlayerAccount ( source ) ) 
  if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then
zikatop[source] = createVehicle (Cars,x,y,z)
warpPedIntoVehicle (source,zikatop[source])
outputChatBox ("#000000[ #9a00c1PRIVADO #000000] - #FFFFFFVocê pegou o #9a00c1JAGUAR #FFFFFFprivado!", source, 255, 255, 255, true) -- Mensagem De Erro
setElementData (source, "Pegou",true)
setTimer (setElementData, 0, 1, source, "Pegou", false)
end
addCommandHandler ("tr1", CreateVehicle1)

function DestroyVeiculo ()
destroyElement (zikatop[source])
end
addEventHandler ("onPlayerLogout", root, DestroyVeiculo)
addEventHandler ("onPlayerQuit", root, DestroyVeiculo)
addEventHandler ("onPlayerWasted", root, DestroyVeiculo)

 


 

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...