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

Wysłany: 2022-02-21, 20:52


GGHal







Wiek: 20
Na forum: 1589 dni
Posty: 40
Nick w MP: KUBIX5

Piwa: 1

Respekt: 40,5

Sima mam tak prace i wszystko dziala tylko nie dostaje kasy pomoze ktos albo ktos da prace kosiarek a ja se przemieszcze.
i zmieni? zeby by?o od 100srp
i ?eby dostawa?o sie od 1.4srpg prosze o pomocc

https://imgur.com/a/zi5Kf9t

script
local missionPed
local missionBlip
local missionMarker
local missionVehicle
local screenWscreenH guiGetScreenSize()

local code="Koszenie trawy!"

local miejscakosiara2 = {
    {-2218.3, -2346.129.700000762939},
    {-2203.3999023438, -2390.89929.9},
    {-2202.19, -2378.800048828129.7},
    {-2227.1000, -2374.399902343832.700000},
    {-2215.3999023438, -236731.5},
}
--local missionZaladunek=createMarker(-2382.81,-59.88,35.32-0.90,"cylinder",5,0,128,128)

local jobText=createElement("text")
setElementPosition(jobText279.201117.7510.23+1.5)
setElementData(jobText"name""PRACA: Kosiarki\nZAROBEK:\nGRACZ 10PLN\nOPIS: Koszenie trawnika")

addEvent("startJobek"true)
addEventHandler("startJobek"resourceRoot, function(veh)
    if getElementData(localPlayer,"player:job") ~= code then return end
    missionVehicle=veh
    showMarker()
    outputChatBox(">>> Rozpocz??e?(a?) prac?.")
end)



function finishJob(plr,value1,value2)
    if plr ~= getLocalPlayer() then return end
    if getElementData(localPlayer,"player:job") ~= code then return end
    if value1 == true then
        if isElement(missionMarker) and missionMarker then
            destroyElement(missionMarker)
            missionMarker=nil
        end
        if isElement(missionBlip) and missionBlip then
            destroyElement(missionBlip)
            missionBlip=nil
        end
    end
    if value2 == true then
        if isElement(missionVehicle) and missionVehicle then
            triggerServerEvent("destroyVehicle"rootmissionVehicle)
            missionVehicle=nil
        end
    end
end

addEvent("onFinish"true)
addEventHandler("onFinish"resourceRoot, function(plr)
    if plr~=localPlayer then return end
    finishJob(plrtrue,true)
end)

function showNextPoint(el,md)
    if not md or el~=localPlayer then return end
    local veh=getPedOccupiedVehicle(el)
    if not veh then return end
    if getVehicleController(veh) ~= localPlayer then return end
    finishJob(el,true,false)
    setTimer(function()
        finishJob(true,false)
        --if getElementData(veh,"praca:punkt") == 5 then
            --triggerServerEvent("givePlayerMoney"el31)
            --setElementData(veh,"praca:punkt"0)
        --else
            --local xd getElementData(veh"praca:punkt") or 0
            --setElementData(veh,"praca:punkt"xd+1)
            --triggerServerEvent("givePlayerMoney"el30)
        --end
        --outputChatBox("* Za godne koszenie otrzymujesz 6 PLN")
        if getElementData(el,"player:premium"then
        outputChatBox(">>> Za skoszenie kawa?ka trawnika, otrzymujesz 7 PLN.")
        triggerServerEvent("givePlayerMoney"el70)
        else
        outputChatBox(">>> Za skoszenie kawa?ka trawnika, otrzymujesz 7 PLN.")
        triggerServerEvent("givePlayerMoney"el70)
        end
        showMarker()
    end1001)
end

function showMarker()
    local losuj math.random(2#miejscakosiara2)
    rnd=miejscakosiara2
    missionMarker=createMarker(rnd[losuj][1], rnd[losuj][2], rnd[losuj][3]-1"checkpoint"2018784)
    missionBlip=createBlipAttachedTo(missionMarker12)
    addEventHandler("onClientMarkerHit"missionMarkershowNextPoint)
end


addEventHandler("onClientVehicleExit"resourceRoot, function(plr,seat)
    if seat~=0 then return end
    if plr~=localPlayer then return end
    finishJob(plrtrue,true)
    setElementData(plr,"player:job",false)
    outputChatBox("* Zako?czy?e?(a?) prac?.")
end)

local zone createColCuboid(238.101031.9199090180.9)
function ucieczkatheElementmatchingDimension )
    if ( theElement == getLocalPlayer() ) then 
        if getElementData(theElement,"player:job") ~= code then return end
        finishJob(theElementtrue,true)
        setElementData(theElement,"player:job",false)
    end
end
addEventHandler("onClientColShapeLeave",zone,ucieczka)



addEventHandler("onClientVehicleExplode"resourceRoot, function()
    if getElementModel(source) ~= 572 then return end
    local plr=getVehicleController(source)
    if plr~=localPlayer then return end
    finishJob(plrtrue,true)
    setElementData(plr,"player:job",false)
    outputChatBox("* Zako?czy?e?(a?) prac?.")
end)


addEventHandler("onClientResourceStop"resourceRoot, function()
    if getElementData(localPlayer"player:job")==code then
        setElementFrozen(localPlayerfalse)
        setElementData(localPlayer"player:job"false)
    end
end,false,"high")



local jobOnline=true -- czy praca w??czona
local jobMarker=createMarker(-2204.3999023438, -2354.399902343829.6"cylinder"3969696) -- marker
createBlip(-2216.8999023438, -2366.800048828131.29999923706146,2,0,0,0,0,0,275)


addCommandHandler("rozpocznij", function(cmd)
    plr=localPlayer
    if isPedInVehicle(plrthen return end
    if not isElementWithinMarker(plr,jobMarkerthen return end
    if jobOnline == false then
        outputChatBox("* Praca jest wy??czona.")
        return
    end
    if getElementData(plr,"player:job"then
        outputChatBox("* Ju? posiadasz aktywn? prac?.")
        return
    end
    setElementData(plr,"player:job"code)
    triggerServerEvent("startJobS"root,localPlayer)
end)

addEventHandler("onClientMarkerHit"jobMarker, function(el,md)
    if el~=localPlayer then return end
    if getElementType(el) == "player" then
        if isPedInVehicle(elthen return end
        outputChatBox(">>> Aby rozpocz?? prac? wpisz /rozpocznij")
    end
end)


Ostatnio zmieniony przez GGHal 2022-02-21, 21:10, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2022-02-21, 21:10


adaskOO

Ten który patrzy






Wiek: 24
Na forum: 3732 dni
Posty: 249
Nick w MP: adaskOO

Piwa: 3168

Respekt: 280
Respekt: 280Respekt: 280Respekt: 280

b??dy jakies w db3 s? ze nie dostaje kasy?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2022-02-21, 21:11


GGHal







Wiek: 20
Na forum: 1589 dni
Posty: 40
Nick w MP: KUBIX5

Piwa: 1

Respekt: 40,5

adaskOO, na ss masz i tam sa jakies na czerwono

[ Dodano: 2022-02-21, 21:13 ]
adaskOO, https://imgur.com/a/zi5Kf9t tu masz te b?edy tylko sobie powieksz

Postaw piwo autorowi tego posta
 

 
Wysłany: 2022-02-21, 21:37


adaskOO

Ten który patrzy






Wiek: 24
Na forum: 3732 dni
Posty: 249
Nick w MP: adaskOO

Piwa: 3168

Respekt: 280
Respekt: 280Respekt: 280Respekt: 280

Nie masz jakiego? skryptu typu prace-setting lub co? bo brakuje eventu givePlayerMoney po stronie servera

Postaw piwo autorowi tego posta
 

 
Wysłany: 2022-02-21, 21:42


GiorgioUlani

JesteśNoobem






Wiek: 26
Na forum: 2037 dni
Posty: 26
Nick w MP: ANONIM

Piwa: 6

Respekt: 50

"GGHal" napisał/a:

adaskOO, na ss masz i tam sa jakies na czerwono

[ Dodano: 2022-02-21, 21:13 ]
adaskOO, https://imgur.com/a/zi5Kf9t tu masz te b?edy tylko sobie powieksz


https://www45.zippyshare.com/v/vzO7pOg1/file.html

Pobierz wrzu? zrestartuj prace i wuala :0

Podpis
WieśRPG

TOPOWY PSEUDOL
https://discord.gg/r7vcVaaMVa
Postaw piwo autorowi tego posta
 

 
Wysłany: 2022-02-21, 22:09


GGHal







Wiek: 20
Na forum: 1589 dni
Posty: 40
Nick w MP: KUBIX5

Piwa: 1

Respekt: 40,5

adaskOO, dobra dzi?ki ze pomog?e? bo wlaczylem te ustawienia prac czy cos takiego i dziala <3

Postaw piwo autorowi tego posta
 

 
Tagi: praca :: kosiare :: nie :: dziala
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA 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