Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: gazety
1. Praca Gazety
Witam, mam pewien problem, zrobi?em sobie prac? gazety lecz nie dzia?a jak powinna ot?? buguje si? jak 2 gracze wykonuj? t? prac?....

[lua]function startGazeciarz(plr)
if not(getElementData(plr, "gracz_xpraca")) then
local rnd = math.random (1, #Punkty)
marker = createMarker(Punkty[rnd][1], Punkty[rnd][2], Punkty[rnd][3]-0.96, "cylinder", 1, 0, 0, 255, 255, plr)
blip = createBlip(Punkty[rnd][1], Punkty[rnd][2], Punkty[rnd][3]-0.96, 41, 2, 255, 0, 0, 255, 0, 3000, plr)

if numer == 0 then
outputChatBox("** Zakazuje si? jechania do punkt?w pojazdem, tylko rowerami! **", plr)
outputChatBox("* Rozpocz??e? prac?, dostarcz gazet? do miejsca na mapie!", plr)
setElementData(plr, "gracz_praca", true)
end

addEventHandler("onMarkerHit", marker, function(el, md)
if not md or getElementType(el) ~= "player" then return end
if numer == 10 then
numer = 0
destroyElement(blip)
destroyElement(marker)
givePlayerMoney(el, koszt)
setElementData(el, "gracz_praca", false)
outputChatBox("* Zako?czy?e? prac?, podsumuj?c otrzymujesz: ".. koszt .." EUR i ".. koszt2 .." GP", el)
else
destroyElement(blip)
destroyElement(marker)
numer = numer + 1
startGazeciarz(el)
end
end)
else
outputChatBox("* Ju? posiadasz aktywn? prac?!", plr)
end
end
addEventHandler("onMarkerHit...