Sp4rk.py Posted December 20, 2020 Posted December 20, 2020 Sou iniciante em lua e estou tentando criar um script que faça com que quando o player esteja no "ModoPassivo" e pegue um veículo, o veículo dele fique blindado, e quando ele saia do "ModoPassivo" o veículo fique normal. Acontece que simplesmente não funciona. Alguem poderia me ajudar apontando onde errei ou algo do tipo? Server: function test47 (thePlayer) if getElementData ( thePlayer, "ModoPassivo" ) == true then local theVehicle = getPedOccupiedVehicle (thePlayer) if theVehicle and isElement (theVehicle) then setVehicleDamageProof (theVehicle, true) else setVehicleDamageProof (theVehicle, false) end end end
LucasST Posted December 21, 2020 Posted December 21, 2020 addEventHandler("onVehicleEnter",root,function(thePlayer) if getElementData(thePlayer,"ModoPassivo") == true then setVehicleDamageProof(source,true) else setVehicleDamageProof(source,false) end end) -- NÃO SE ESQUEÇA DE QUANDO ELE SAIR DO MODO PASSIVO, TIRAR A BLINDAGEM DO VEICULO !! TENTE ISSO
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now