Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2018-10-19, 23:23


AkossPL







Wiek: 25
Na forum: 4079 dni
Posty: 140
Nick w MP: AkossPL

Piwa: 3

Respekt: 50

Siema tak jak w temacie postawie piwo

function displayNextCP(el,md)
    if el~=localPlayer or not md then return end
    if not getPedOccupiedVehicle(elthen return end
    if jobTarget #jobPoints then
        jobTarget=1
        showMarker()
        jobTarget=jobTarget+1
        showMarker()
        jobTarget=1
        showMarker()
        if getElementData(localPlayer,"player:premiumpp"then -- z premk?
        zarobek math.random(2500000,3000000) -- hajs ustal sam
        exports.noti:showBox("error","Za piel?gnacje ro?lin otrzymujesz "..zarobek.." PLN")
        triggerServerEvent("givePlayerMoney"localPlayerzarobek0)  
        else
        zarobek math.random(2000000,2500000) -- bez premki hajs ustal sam
        exports.noti:showBox("error","Za piel?gnacje ro?lin otrzymujesz "..zarobek.." PLN")
        triggerServerEvent("givePlayerMoney"localPlayerzarobek0)
    end
end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-10-20, 00:05


Dawcio77







Wiek: 22
Na forum: 3312 dni
Posty: 89
Nick w MP: cx_u

Piwa: 136

Respekt: 35,8

Za ma?o kodu. Rozwi? troche co chcesz.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-10-20, 01:05


AkossPL







Wiek: 25
Na forum: 4079 dni
Posty: 140
Nick w MP: AkossPL

Piwa: 3

Respekt: 50

Dawcio77,
-- Settings
local jobBlip
local jobTarget
local jobMarker
local jobVehicle
local jobWeave={80000,0}
local jobWeaveP={120000,0}
local jobPoints={
    {965.33,-1010.29,33.46,0,0,0},
    {1117.58,-958.15,42.09,0,0,0},
    {1193.10,-661.63,60.38,0,0,0},
    {1222.95,-249.19,23.50,0,0,0},
    {1280.24,-100.68,36.82,0,0,0},
    {1288.48,162.54,19.99,0,0,0},
    {1350.24,354.27,19.48,0,0,0},
    {1699.49,380.41,19.30,0,0,0},
    {2186.84,229.33,14.07,0,0,0},
    {2341.04,154.68,25.85,0,0,0},
    {2260.70,95.27,25.89,0,0,0},
    {2219.59,67.83,25.88,0,0,0},
    {2281.10,-47.78,26.53,0,0,0},
    {1932.45,43.92,33.33,0,0,0},
    {1201.99,-217.18,33.13,0,0,0},
    {1197.27,-643.68,58.76,0,0,0},
    {993.54,-1038.27,30.10,0,0,0},
    {1000.46,-1105.15,23.35,0,0,0},

}
-- Functions
local function finishJob(value)
    if jobMarker and isElement(jobMarkerthen
        destroyElement(jobMarker)
        jobMarker=nil
    end
    if jobBlip and isElement(jobBlipthen
        destroyElement(jobBlip)
        jobBlip=nil
    end
    if value then
        jobVehicle=nil
        setElementData(localPlayer,"player:job",false)
    end
end

addEventHandler("onClientMarkerHit"resourceRoot, function(eldim)
    if el ~= localPlayer or not dim or getElementType(el) ~= "player" or getPedOccupiedVehicle(elthen return end 
    if getElementData(el"player:license:pjC") ~= 1 then
        exports.noti:showBox("warning""Aby tu pracowa? potrzebujesz prawo jazdy kategorii C.")
        return
    end
end)

setTimer(function()
    if jobVehicle and isElement(jobVehicle) and getPedOccupiedVehicle(localPlayer) ~= jobVehicle then
        triggerServerEvent("cancelJob"resourceRootjobVehicle)
        finishJob(true)
    end
end100000)

function displayNextCP(el,md)
    if el~=localPlayer or not md then return end
    if not getPedOccupiedVehicle(elthen return end
    if jobTarget #jobPoints then
        jobTarget=jobTarget+1
        showMarker()
        if not getElementData(localPlayer,"player:premiumpp"then -- z premk?
        exports.noti:showBox("error","Za piel?gnacje ro?lin otrzymujesz 100000 PLN")
        triggerServerEvent("givePlayerMoney"eljobWeaveP[1], jobWeaveP[2])
        else
        exports.noti:showBox("error","Za piel?gnacje ro?lin otrzymujesz 100000 PLN")
        triggerServerEvent("givePlayerMoney"eljobWeave[1], jobWeave[2])
        else
        jobTarget=1
        showMarker()
    end
end

function showMarker()
    finishJob(false)
    local rnd=jobPoints[jobTarget]
    jobMarker=createMarker(rnd[1], rnd[2], rnd[3], "checkpoint"525500)
    jobBlip=createBlip(rnd[1], rnd[2], rnd[3], 12)
    addEventHandler("onClientMarkerHit"jobMarkerdisplayNextCP)
end

function startJob(veh)
    jobTarget=1
    jobVehicle=veh
    showMarker()
    setElementData(localPlayer,"player:job","Dostawca Cementu")
    outputChatBox("#964B00Praca dostawca cementu: #ffffffJed? wed?ug ustalonej trasy dostaw.",_,_,_,true)
end
addEvent("startJob"true)
addEventHandler("startJob"resourceRootstartJob)

addEventHandler("onClientResourceStop"resourceRoot, function()
    if getElementData(localPlayer,"player:job") == "Dostawca Cementu" then
        setElementData(localPlayer"player:job"false)
    end
end)


Postaw piwo autorowi tego posta
 

 
Tagi: nie :: pokazują :: się :: punkty
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Nie pokazują się punkty Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

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
Dodaj temat do Ulubionych
Wersja do druku