Witam m?j problem polega na tym, ?e jak wyje?d?am z markeru to spami mi wiadomo?ciami, a maj? tylko raz wyskakiwa?. Nie wiem czym to jest spowodowane. Kto? pomo?e ?
[lua]function stacjaPociong(el)
if el ~= localPlayer then return end
local wyjazdtimer = getTickCount()
if getElementData(source, "stacja") == true then
if wyjazdtimer - wjazdtimer >= 10000 then
wyjazdtimer = 0
wjazdtimer = 0
auto = getPedOccupiedVehicle(localPlayer)
destroyElement(getElementData(source, "blip"))
destroyElement(source)
rnd2 = math.random(1, #markery)
marker2 = createMarker(markery[rnd2][1], markery[rnd2][2], markery[rnd2][3] - 1, "checkpoint", 4, 0, 0 ,100, 45)
setElementData(marker2, "stacja", true)
blip2 = createBlipAttachedTo(marker2, 41)
random2 = math.random(10, 20)
random3 = math.random(1, 10)
ludzie = random2 - random3
setElementData(auto, "ludzie", getElementData(auto, "ludzie") + ludzie)
outputChatBox("Do poci?gu wesz?o: "..random2..", a wysz?o: "..random3.." osoby.", 0, 180, 247)
outputChatBox("Jed? na nast?pn? stacj?: "..markery[rnd2][4].."", 0, 180, 247)
else
outputChatBox("Wr?c do markera i poczekaj, a? ludzie wejd? do poci?gu !", 0, 180, 247)
wyjazdtimer = 0
wjazdtimer = 0
removeEventHandler("onClientRender", getRootElement(), dx)
killTimer(timer)
end
end
end
addEventHandler("onClientMarkerLeave", getRootElement...