?adnie marcinku, tego end'a wstawi?e? xD. Ale bardziej obstawia?bym tak:
addEventHandler("onMarkerHit", haracz, function(hitElement, md)
setTimer(function ()
if not md then return end
if getElementType(hitElement) == "player" then
local podatek = cena * 0.01
local cena = math.random(1000,300000) - podatek
givePlayerMoney (hitElement, podatek )
outputChatBox(" Zebrano Haracz!",hitElement, 255, 255, 255, true )
end
end,70000,0)
end)
Chocia? w?tpi?, aby sama poprawa end'u tu pomog?a.
addEventHandler("onMarkerHit", haracz, function(hitElement, md)
setTimer(function ()
if not md then return end
if getElementType(hitElement) == "player" then
local cena = math.random(1000,300000) - podatek
local podatek = cena * 0.01
givePlayerMoney (hitElement, podatek )
outputChatBox(" Zebrano Haracz!",hitElement, 255, 255, 255, true )
end,70000,0)
end)
deklaracja podatku przed zdeklarowana cena nie b?dzie dzia?a? skrypt nie b?dzie czyta? tego
AteX zwr?ci? uwag? na b??dne po?o?enie enda, co nie zmienia faktu, ?e reszta kodu jest nieprawid?owa. Hazmudex, tw?j kod te? nie zadzia?a. Brakuje enda, komentarz jest ?le zadeklarowany, a argumenty w timerze nie zosta?y przes?ane.
addEventHandler("onMarkerHit", haracz, function(hitElement, md)
setTimer(function (hitElement, md)
if not md then return end
if getElementType(hitElement) == "player" then
local cena = math.random(1000,300000) -- podatek
local podatek = cena * 0.01
givePlayerMoney (hitElement, podatek)
outputChatBox(" Zebrano Haracz!", hitElement, 255, 255, 255, true )
end
end, 70000, 0, hitElement, md)
end)
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach