R1S1NG Posted April 15, 2018 Share Posted April 15, 2018 local Veiculos = {494} -- IDs dos Veículos. Tulio = {} function CreateVehicle (source) if getElementData (source, "Pegou", true) then outputChatBox ('#c1c1c1Aguarde #ffffff20 #ffffffsegundos para pegar novamente.',source,255,255,255,true) return end if isElement(Tulio[source]) then destroyElement (Tulio[source]) Tulio[source] = nil end local x,y,z = getElementPosition (source) local Cars = Veiculos[math.random(#Veiculos)] Tulio[source] = createVehicle (Cars,x,y,z) setElementData (source, "Pegou",true) setTimer (setElementData, 20000, 1, source, "Pegou", false) end addCommandHandler ("494", CreateVehicle) function DestroyVeiculo () destroyElement (Tulio[source]) end addEventHandler ("onPlayerLogout", root, DestroyVeiculo) addEventHandler ("onPlayerQuit", root, DestroyVeiculo) addEventHandler ("onPlayerWasted", root, DestroyVeiculo) Como eu faço com que esse script faça o veiculo do player sair do lado e não encima dele? Link to comment
Other Languages Moderators Lord Henry Posted April 15, 2018 Other Languages Moderators Share Posted April 15, 2018 (edited) Vc pode simplesmente somar a posição X de onde o veículo vai nascer + 2. local x, y, z = getElementPosition (source) x = x+2 ... ... Edited April 15, 2018 by Lord Henry Link to comment
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