Jump to content

[RESOLVIDO] - Como blockear um carro para tal ACL?


Recommended Posts

resolvido.png

Bom seria exemplo o carro: Police LS/ID:596

Queria blockea-lo só para a ACL pm conseguir entrar.Pois assim nenhum jogador pega o carro ou turbina ele da forma que ele quiser.Se alguém puder me ajudar,agradeço.

E se a pessoa criar o veículo e tentar da F ou G e não tiver na ACL aparecerá no CHAT:

Apenas A PM Pode entrar neste veículo.

E queria um que desse para editar.

Edited by Guest
Link to comment
function enterVehicle(player, seat, jacked) 
    local account = getPlayerAccount(player) 
    if (not account or isGuestAccount(account)) then return end 
    local accountName = getAccountName(account) 
    if (getElementModel(source) == 596) and (not isObjectInACLGroup("user.".. accountName,aclGetGroup("Police"))) then 
        setVehicleLocked(source, true) 
        outputChatBox("Apenas A PM Pode entrar neste veículo.", player) 
    else 
        setVehicleLocked(source, false) 
    end 
end 
addEventHandler("onVehicleStartEnter",root,enterVehicle) 

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...