R1S1NG Posted April 15, 2018 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?
Moderators Lord Henry Posted April 15, 2018 Moderators 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 Eu te ajudei ou achou meu comentário útil? Não esqueça de deixar um Thanks! Minhas contribuições para a comunidade: LordHenry - MTA Wiki Profile Inscreva-se no meu canal do YouTube: Lord Henry - Entertainment Discord Oficial do MTA: https://mtasa.com/discord Blacklist e Whitelist de Scripters: Planilha Por favor, não me envie mensagens privadas solicitando suporte. Crie um tópico no fórum em vez disso.
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