bindKey("mouse1", "down", function()
if not getElementData(localPlayer, "gui:listonosz") or getElementData(localPlayer, "gui:listonosz") ~= true then return end
if isMouseIn(404*px, 447*py, 227*px, 38*py) then
if getElementData(localPlayer, "praca") then
exports["np-notyfikacje"]:noti("Posiadasz aktywn? prac?!")
return end
zrobione = 0
triggerServerEvent("create:listonosz", localPlayer)
exports["np-notyfikacje"]:noti("Rozpoczynasz prac? listonosza")
showCursor(false)
setElementData(localPlayer, "gui:listonosz", nil)
setElementData(localPlayer, "praca", "listonosz")
for i,v in ipairs(punktyListonosza) do
local markerList = createMarker(v[1], v[2], v[3]-0.9, "cylinder", 1, 29, 10 ,100)
local blipList = createBlipAttachedTo(markerList, 41)
addEventHandler("onClientMarkerHit", markerList, function(hit)
if hit ~= localPlayer then return end
if isPedInVehicle(localPlayer) then
outputChatBox("Nie mo?esz siedzie? w poje?dzie!", 255, 0, 0) return end
zrobione = zrobione+1
destroyElement(source)
destroyElement(blipList)
exports["np-notyfikacje"]:noti(" wykonano: "..tostring(zrobione).."")
local pieniadz = math.random(10, 200)
triggerServerEvent("giveMoney", localPlayer, pieniadz)
if zrobione == #punktyListonosza then
triggerServerEvent("hajs:listonosz", localPlayer)
setElementData(localPlayer, "praca", nil)
return
end
end
end
if isMouseIn(404*px, 399*py, 227*px, 38*py) then
if isMouseIn(404*px, 495*py, 227*px, 38*py) then
showCursor(false)
setElementData(localPlayer, "gui:listonosz", nil)
end
end
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