MaRcell Posted September 8, 2016 Posted September 8, 2016 (edited) I have a problem in my script the mission at the time of outputchatbox flooda chat of other mission / = local MarkTrab = createMarker(1809.78833 ,-1433.85901 ,12.42969,"cylinder", 6, 255, 0, 0, 255) local MarkChego = createMarker(2476.71704, -1055.81750 ,65.56454, "cylinder", 6, 255, 0, 0, 255) local MyBlip = createBlip (1809.78833 ,-1433.85901 ,13.42969,26) cam = {} blipxxx = {} function TrabBus (source) local account = getAccountName (getPlayerAccount(source)) local x,y,z = getElementPosition(source) if (getElementData(source, "Trab", true)) then outputChatBox ("#FF0000Você já esta Em uma missao.", source, 255, 255, 255, true) return end cam[source] = createVehicle (587,1798.34216 ,-1430.41675 ,13.42272) setElementRotation(cam[source], 0,0,90) warpPedIntoVehicle (source, cam[source]) aclGroupAddObject (aclGetGroup("Truck"), "user."..account) blipxxx[source] = createBlip (2476.71704, -1055.81750 ,66.56454) setElementData(source, "Trab", true) outputChatBox(" ") outputChatBox(" ") outputChatBox("#ff00ff=========================MISSAO=============================", source, 255, 255, 255, true) outputChatBox("#00FF9E--Leve o carro até a bandeira vermelha.", source, 255, 255, 255, true) outputChatBox("#00FF9E--Voce ganhara 12.000 R$ pra fazer esta viagem.", source, 255, 255, 255, true) outputChatBox("#00FF9E--para sair da missao digite /sairmissao.",source, 255, 255, 255, true) outputChatBox("#FF0000--se sair do carro voce fracassara a missao :)",source, 255, 255, 255, true) outputChatBox("#ff00ff============================MISSAO===========================",source, 255, 255, 255, true) outputChatBox(" ") outputChatBox(" ") end addEventHandler ("onMarkerHit", MarkTrab, TrabBus) function rreem (source) local accounat = getAccountName (getPlayerAccount(source)) aclGroupRemoveObject (aclGetGroup("Truck"), "user."..accounat) outputChatBox ('#ffff00* Valter: #ffffffVoce desistiu da missao.',source,255,255,255,true) setPedSkin (source,0) destroyElement(cam[source]) setElementData(source, "Trab", false) end addCommandHandler("sairmissao",rreem) function TrabBusChego (source) if cam[source] and isElement(cam[source]) and getElementData (source, "Trab", true) then destroyElement (blipxxx[source]) destroyElement (cam[source]) local accounat = getAccountName (getPlayerAccount(source)) aclGroupRemoveObject (aclGetGroup("Truck"), "user."..accounat) setElementData(source, "Trab", false) givePlayerMoney (source, 12000) outputChatBox( '#ffffffMISSAO COMPLETA +12MIl.',source,255,255,255,true) setPedSkin (source,0) setElementData(source, "Trab", false) end end addEventHandler ("onMarkerHit", MarkChego, TrabBusChego) function NSPode (source) if (cam[source]) and isElement(cam[source]) then outputChatBox ('#FF5100* #ffffffVocê tem #FF510010 #ffffffsegundos parar voltar para o Carro.', source, 255, 255, 255, true) T11 = setTimer (destroyElement, 10000,1, blipxxx[source]) T22 = setTimer (destroyElement, 10000,1, cam[source]) T33 = setTimer (setElementData, 10000,1, source, "Trab", false) T44 = setTimer (function() Trabalho = false setPedSkin (source,0) outputChatBox ('#FF5100* #ffffffVocê ficou muito tempo fora do veiculo e fracasso a missao!.', source, 255, 255, 255, true) setElementData(source, "Trab", false) end, 10000, 1) end end addEventHandler ("onVehicleExit", root, NSPode) function SNPode (source) if (cam[source]) and isElement(cam[source]) then killTimer (T11) killTimer (T22) killTimer (T33) killTimer (T44) end end addEventHandler ("onVehicleEnter", root, SNPode) Edited September 9, 2016 by jhxp Changed topic title
Gravestone Posted September 8, 2016 Posted September 8, 2016 Please use the new way to post lua code. Clan war system http://sh.st/7r4nI
EstrategiaGTA Posted September 8, 2016 Posted September 8, 2016 @MaRcell change this: outputChatBox(" ") Into this: outputChatBox:(" ", source)
MaRcell Posted September 8, 2016 Author Posted September 8, 2016 https://uploaddeimagens.com.br/imagens/mta-screen_2016-09-08_17-30-15-png flooda even when I leave the vehicle / = print outputChatBox ('#FF5100* #ffffffVocê tem #FF510010 #ffffffsegundos parar voltar para o Carro.', source, 255, 255, 255, true) T11 = setTimer (destroyElement, 10000,1, blipxxx[source]) T22 = setTimer (destroyElement, 10000,1, cam[source]) T33 = setTimer (setElementData, 10000,1, source, "Trab", false) T44 = setTimer (function() Trabalho = false setPedSkin (source,0) outputChatBox ('#FF5100* #ffffffVocê ficou muito tempo fora do veiculo e fracasso a missao!.', source, 255, 255, 255, true) setElementData(source, "Trab", false) end, 10000, 1) end end addEventHandler ("onVehicleExit", root, NSPode) function SNPode (source) if (cam[source]) and isElement(cam[source]) then killTimer (T11) killTimer (T22) killTimer (T33) killTimer (T44) end end addEventHandler ("onVehicleEnter", root, SNPode)
MTA Team jhxp Posted September 9, 2016 MTA Team Posted September 9, 2016 Corrected your Lua bbcodes. Also, please use more descriptive topic titles in the future, instead of just HELP PLEASE. Thanks. One of the [VCP] leaders // honorary member of the =PCP= gang. Do not PM me your MTA:SA Client / Server support questions, Lua scripting questions, unban requests or server toplist concerns - please ask them here: MTA:SA Support subforum, here: Scripting subforum, here: Ban appeals or here: Servers instead. For other inquiries - please expect delays in replies when messaging me.
Gravestone Posted September 10, 2016 Posted September 10, 2016 outputChatBox ('#FF5100* #ffffffVocê tem #FF510010 #ffffffsegundos parar voltar para o Carro.', source, 255, 255, 255, true) T11 = setTimer (destroyElement, 10000,1, blipxxx[source]) T22 = setTimer (destroyElement, 10000,1, cam[source]) T33 = setTimer (setElementData, 10000,1, source, "Trab", false) T44 = setTimer (function() Trabalho = false if getElementData(source, "Trab") then setPedSkin (source,0) outputChatBox ('#FF5100* #ffffffVocê ficou muito tempo fora do veiculo e fracasso a missao!.', source, 255, 255, 255, true) setElementData(source, "Trab", false) end end, 10000, 1) end end addEventHandler ("onVehicleExit", root, NSPode) function SNPode (source) if (cam[source]) and isElement(cam[source]) then killTimer (T11) killTimer (T22) killTimer (T33) killTimer (T44) end end addEventHandler ("onVehicleEnter", root, SNPode) Try this ^, not tested tho Clan war system http://sh.st/7r4nI
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