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

Wysłany: 2018-11-04, 13:54


droper24hp







Wiek: 25
Na forum: 3201 dni
Posty: 14
Nick w MP: Droper24hp



Respekt: 50

Prosz? pom?c tu macie Clinet:
local sw,sh guiGetScreenSize()
local elements = {}
-------------------------------------------
function isEventHandlerAdded(sEventName,pElementAttachedTo,func)
    if type(sEventName)=='string' and isElement(pElementAttachedTo) and type(func)=='function' then local aAttachedFunctions getEventHandlers(sEventName,pElementAttachedTo)
    if type(aAttachedFunctions)=='table' and #aAttachedFunctions > 0 then for i,v in ipairs(aAttachedFunctions) do if v==func then return true end end end
    end return false
end
-------------------------------------------

function checkButtons(pcl)
    if (pcl==localPlayerthen
        for _,v in ipairs(elements) do
            if isElement(vthen
                destroyElement(v)
            end
        end
        showCursor(false)
        if isEventHandlerAdded("onClientRender",root,onRenderthen
            removeEventHandler("onClientRender",root,onRender)
        end
    end
end

function showButtons(pcl)
    if (pcl==localPlayerthen
        checkButtons(pcl)
        showCursor(true)
        addEventHandler("onClientRender",root,onRender)
        elements[1]=guiCreateButton(sw/2-(190/2),sh/2+80,190,50,"rozpocznij prace[1]",false)
        elements[2]=guiCreateButton(sw/2+300-25,sh/2+150-20,25,20,"zamknij[1]",false)
        
        for _,v in ipairs(elements) do if isElement(vthen guiSetAlpha(v,0end end
    end
end

function onRender()
    dxDrawImage(sw/2-300,sh/2-150,600,300,"tlo_job.png",0,0,0,tocolor(255,255,255,255))
    dxDrawImage(sw/2-(190/2),sh/2+80,190,50,"rozpocznij.png",0,0,0,tocolor(255,255,255,240))
    dxDrawImage(sw/2+300-25,sh/2+150-20,25,20,"zamknij.png",0,0,0,tocolor(255,255,255,255))
    text "Praca Dorywcza\nTransport Mebli\n\nWymagania do rozpocz?cia pracy: Brak\nWynagrodzenia: Od 200k do 225k, Premium od 225k do 250k\n\nInformacje:\nW tej pracy musisz by? bardzo ostro?nym podczas transportu.\n?adunek mo?e si? ?atwo zniszczy?!"
    dxDrawText(tostring(text),sw/2,sh/2-140,sw/2,sh/2-140,tocolor(255,255,255,255),1.5,"default","center")
    dxDrawText("Rozpocznij prac?",sw/2,sh/2+93,sw/2,sh/2+93,tocolor(255,255,255,255),1.25,"default","center")
end

addEventHandler("onClientGUIClick",resourceRoot,function()
    local txt guiGetText(source)
    if txt == "rozpocznij prace[1]" then
        if getElementData(localPlayer,"zdl") == true then
            outputChatBox("Posiadasz na?o?ony zakaz prowadzenia pojazd?w (kat. A/B/C)! Od kary mo?esz zaapelowa? na forum! Wi?cej informacji: zaloguj si? ponownie (chat).",255,0,0,true)
            checkButtons(localPlayer)
            return
        end
        startJob(localPlayer)
        checkButtons(localPlayer)
    elseif txt == "zamknij[1]" then
        checkButtons(localPlayer)
    end
end)

local markerROZP createMarker(1843.20117993.9227945.79093,"cylinder",1.5,0,0,255,150)
setElementInterior(markerROZP0)
addEventHandler("onClientMarkerHit",markerROZP,function(pcl,cmd)
    if not isPedInVehicle(localPlayerthen
        if not getElementData(localPlayer,"player:job"then
            if pcl == localPlayer then
                showButtons(pcl)
            end
        end
    end
end)


------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------MECHANIZM PRACY--------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------
local maxpoints 5
local playerpoints 0

local pointsNEXT = {
    {-2036.261192.8245.44},
    {-2098.031139.4052.70},
    {-2307.14576.5733.54},
    {-2715.71198.564.32},
    {-2171.30,-208.96,35.32},
    {-2694.45134.244.33},
    {-2719.22, -19.604.33},
    {-2648.18, -39.364.33},
    {-2617.29, -198.194.33},
    {-2723.75, -315.107.18},
    {-1754.65958.8124.88},
    {-2721.97979.7554.46},
    {-2663.28990.6664.89},
}

function endJob(plr)
    if (plr==localPlayerthen
        if point and isElement(pointthen destroyElement(pointend
        if blip and isElement(blipthen destroyElement(blipend
        if marker and isElement(markerthen destroyElement(markerend
        if markern and isElement(markernthen destroyElement(markernend
        setElementData(plr,"DM:unlock",false)
    end
end

function startJob(plr)
    if (plr==localPlayerthen
        if not getElementData(plr,"player:job"then
            if not isPedInVehicle(plrthen
                playerpoints 0
                setElementData(plr,"player:job",true)
                setElementData(plr,"player:job:materialy:etap",1)
                outputChatBox("* Praca zosta?a rozpocz?ta!")
                startJobEtap(plr)
                setElementData(plr,"DM:unlock",false)
                outputChatBox("Udaj si? do wn?trza magazynu i za?aduj 5 mebli na pojazd i dostarcz przesy?k?.",0,255,0)
            else
                outputChatBox("Wpierw wysi?d? z pojazdu!",255,0,0,true)
            end
        else
            outputChatBox("Wpierw zako?cz aktualn? prac?!",255,0,0,true)
        end
    end
end


timerrrrr={}

function startJobEtap(plr)
    if (plr==localPlayerthen
        if getElementData(plr,"player:job:materialy:etap") == 1 then
            if playerpoints >= maxpoints then
                setElementData(plr,"player:job:materialy:etap",2)
                startJobEtap(plr)
                return
            end
            marker createMarker(-1834.969241035.8076246.0878592.075073242188-1.2,"cylinder",1.5,255,255,0,200)
            setElementInterior(marker0)
            addEventHandler("onClientMarkerHit",marker,function(plr)
                if (plr==localPlayerthen
                    if getElementData(plr,"player:job"then
                        toggleControl("sprint",false)
                        toggleControl("enter_exit",false)
                        toggleControl("jump",false)
                        triggerServerEvent("giveObject:buildingjob",plr,plr)
                        destroyElement(marker)
                        
                        markern createMarker(-1824.585691027.9046645.23264-1.2,"cylinder",1.5,255,255,0,150)
                        setElementInterior(markern0)
                        addEventHandler("onClientMarkerHit",markern,function(plr)
                            if (plr==localPlayerthen
                                if getElementData(plr,"player:job"then
                                    if not isPedInVehicle(plrthen 
                                        triggerServerEvent("destroyElement:buildingjob",plr,plr)
                                        
                                        destroyElement(markern)
                                        playerpoints tonumber(playerpoints) + 1
                                        
                                        toggleControl("sprint",true)
                                        toggleControl("enter_exit",true)
                                        toggleControl("jump",true)
                                        
                                        startJobEtap(plr)
                                    end
                                end
                            end
                        end)
                    end
                end
            end)
        end

        if getElementData(plr,"player:job:materialy:etap") == 2 then
            setElementFrozen(plr,true)
            setTimer(function()
            setElementInterior(plr,0)
                triggerServerEvent("createVehicle:buildingjob",plr,plr)
                local rnd math.random(1,#pointsNEXT)
                point createMarker(pointsNEXT[rnd][1],pointsNEXT[rnd][2],pointsNEXT[rnd][3]-2,"cylinder",4,0,0,255,150)
                blip createBlipAttachedTo(point,12)
                addEventHandler("onClientMarkerHit",point,function(plr)
                    if (plr==localPlayerthen
                        if getElementData(plr,"player:job"then
                            if isPedInVehicle(plrthen
                                outputChatBox("?wietna robota! Za godn? podziwu prac? otrzymujesz wynagrodzenie!",0,255,0)
                                setElementData(plr,"player:job",false)
                                setElementData(plr,"player:job:materialy:etap",false)
                                triggerServerEvent("destroyElement:buildingjob",plr,plr)
                                triggerServerEvent("destroyVehicle:buildingjob",plr,plr)
                                endJob(plr)
                                setElementData(plr,"DM:unlock",true)
                                local kasa math.random(200000,225000)
                                                                local kasapremium math.random(225000,250000)
                                                                if getElementData(localPlayer,"player:premium"then
                                                                givePlayerMoney(kasapremium)
                                                            else
                                                            givePlayerMoney(kasa)
                                                                end
                                fadeCamera(false)
                                setTimer(function()
                                    fadeCamera(true)
                                end,3500,1)
                                playerpoints 0
                                timerrrrr[plr] = setTimer(function()
                                    setElementPosition(plr,-1843.88684995.0822845.85445)
                                end,2500,1)
                            else
                                endJob(plr)
                            end
                        else
                            endJob(plr)
                        end
                    end
                end)
            end,1000,1)
        end
    end
end
                                                               
addEventHandler("onClientVehicleExit",resourceRoot,function(plr,seat)
    if plr == localPlayer then
    
        endJob(plr)
        setElementData(plr,"player:job",false)
        setElementData(plr,"player:job:materialy:etap",false)
        triggerServerEvent("destroyElement:buildingjob",plr,plr)
        triggerServerEvent("destroyVehicle:buildingjob",plr,plr)
        playerpoints 0
    end
end)

addEventHandler("onClientPlayerWasted",root,function()
    if source == localPlayer then
        endJob(source)
        setElementData(source,"player:job",false)
        setElementData(source,"player:job:materialy:etap",false)
        triggerServerEvent("destroyElement:buildingjob",source,source)
        triggerServerEvent("destroyVehicle:buildingjob",source,source)
        playerpoints 0
    end
end)

fileDelete("client.lua")
Sever:

local vehicles = {
{2568,-1302.5,1044.19,0,0,270},
}

local text createElement("text")
setElementData(text"scale"1)
setElementData(text,"name""Nielegalna praca\nMarihuana\nWymagania: Brak\nRadzimy uwa?a? na policj? kt?ra raz na jaki? czas si? tutaj kr?ci")
setElementPosition(text,-1843.34863993.21570,44.4+1.2)

for _,v in ipairs(vehicles) do
    local vehicle createVehicle(499,v[1],v[2],v[3],v[4],v[5],v[6])
    setElementFrozen(vehicle,true)
    setVehicleLocked(vehicle,true)
    setVehicleVariant(vehicle,2,2)
    setElementData(vehicle,"pojazdpracy",true)
    setVehicleColor(vehicle,175,118,007,088,114,070)
    setElementInterior(vehicle0)
end


object = {}
veh = {}

addEvent("giveObject:buildingjob",true)
addEventHandler("giveObject:buildingjob",root,function(plr)
    if plr then
        object[plr] = createObject(1704,0,0,0,0,0,0)
        setElementCollisionsEnabled(object[plr],false)
        setElementDoubleSided(object[plr],true)
        setObjectScale(object[plr],0.8)
        attachElements(object[plr],plr,-0.35,0.6,0,0,0,0,0)
        setTimer(setPedAnimation,50,1,plr,"CARRY","crry_prtial",1)
        setElementInterior(object[plr], 0)
    end
end)

addEvent("destroyElement:buildingjob",true)
addEventHandler("destroyElement:buildingjob",root,function(plr)
    if plr then
        if object[plr] and isElement(object[plr]) then
            destroyElement(object[plr])
        end
        setPedAnimation(plr,"CARRY","crry_prtial",1,true,false,true,false)
    end
end)






addEventHandler("onVehicleStartEnter",resourceRoot,function(plr,seat)
    if seat == 0 then
        cancelEvent()
    end
end)



addEventHandler("onMarkerHit"getRootElement(), function(el,md)
    if source == rozpraca then
        if getElementType(el) == "vehicle" then return end
        if getPedOccupiedVehicle(elthen return end
        if getElementData(el"player:job"then outputChatBox("* Posiadasz rozpocz?t? prac?!",el)    return end
        outputChatBox("Rozpocz??e? prac? Dilerk?!",el255255255)
        setElementData(el"player:job","Marycha")
        triggerClientEvent(el"marycha"elmd)
        toggleControl(el,"enter_exit"false)
    elseif source == zakpraca then
        if getElementType(el) == "vehicle" then return end
        if getPedOccupiedVehicle(elthen return end








t1 = {}
t2 = {}
t3 = {}

local pv = {
    {-2639.826901438.574957.07637000},
    {-2630.102781430.969127.07525000},

}

addEvent("createVehicle:buildingjob",true)
addEventHandler("createVehicle:buildingjob",root,function(plr)
    if plr then
        local rnd math.random(1,#pv)
        
        veh[plr] = createVehicle(499,pv[rnd][1],pv[rnd][2],pv[rnd][3],pv[rnd][4],pv[rnd][5],pv[rnd][6],"Meble")
        setElementInterior(veh[plr], 0)
        setElementInterior(plr0)
        setVehicleVariant(veh[plr],2,2)
        setVehicleColor(veh[plr],088,114,070,088,114,070)
        setVehicleLocked(veh[plr],true)
        fadeCamera(plr,false)
        warpPedIntoVehicle(plr,veh[plr])
        t1[plr] = setTimer(function()
            fadeCamera(plr,true)
            setElementFrozen(plr,false)
        end,2000,1)
        outputChatBox("Teraz wystarczy dostarczy? ?adunek! Miejsce zosta?o oznaczone na minimapie!",plr,0,255,0,true)
    end
end)

addEvent("destroyVehicle:buildingjob",true)
addEventHandler("destroyVehicle:buildingjob",root,function(plr)
    if plr then
        if veh[plr] and isElement(veh[plr]) then
            t2[plr] = setTimer(function()
                destroyElement(veh[plr])
                if t2[plr] and isTimer(t2[plr]) then killTimer(t2[plr]) end
            end,1000,1)
        end
        setElementData(plr,"player:job:materialy:etap",false)
        setElementData(plr,"player:job",false)
    end
end)



addEventHandler("onPlayerQuit",root,function()
    if getElementData(source,"login") == getPlayerName(sourcethen
        triggerEvent("destroyElement:buildingjob",source,source)
    end
end)

addCommandHandler("plrjob",function(plr,cmd)
    if getElementData(plr,"ACL") == "admin" then
        setElementData(plr,"player:job",false)
    end
end)


function isVehicleEmpty(vehicle)
    if not isElement(vehicle) or getElementType(vehicle) ~= "vehicle" then return true end
    local passengers getVehicleMaxPassengers(vehicle)
    if type(passengers) == "number" then
        for seat 0passengers do
            if getVehicleOccupant(vehicle,seatthen return false end
        end
    end
    return true
end

setTimer(function()
    for _,v in ipairs(getElementsByType("vehicle",resourceRoot)) do
        if isVehicleEmpty(vthen
            if getElementData(v,"pojazdpracy") == false then
                destroyElement(v)
            end
        end
    end
end,15000,0)










prosz? pom?c

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-04, 14:18


Kalizman







Wiek: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

b?edy db3

Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
droper24hp
Wysłany: 2018-11-04, 15:14


droper24hp







Wiek: 25
Na forum: 3201 dni
Posty: 14
Nick w MP: Droper24hp



Respekt: 50

a pomo?esz jako? naprawi? ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-04, 15:30


NotPaladyn







Wiek: 23
Na forum: 2790 dni
Posty: 866
Nick w MP: NotPaladyn

Piwa: 3135

Respekt: 690
Respekt: 690Respekt: 690


   Vice Admin: Jeśli potrzebujesz pomocy w sprawach organizacyjnych lub technicznych - skontaktuj się ze mną.
Na pewno spr?bujemy pom?c
Wpisz komende /debuscript 3
Oraz jesli b?d? tam widoczne ?e s? jakie? b??dy to napisz nam tu jakie lub zrob ss i daj go tutaj

Podpis

Zarejestrowany - 14.10.2018r.
Support-Team - 01.06.2019r. - 01.11.2019r.
Test-Mod - 01.11.2019r. - 31.12.2019r.
Moderator - 31.12.2019r. - 01.11.2020r.
Mod-Team - 01.11.2020r. - 03.05.2022r.
Vice Admin - 03.05.2022r. -



-------------------------------------------------------


Tworzę skrypty i modele na zamówienie
W razie pytań zapraszam do kontaktu

--------------Kontakt--------------
Discord: NotPaladyn#2943 / notpaladyn
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
droper24hp
Wysłany: 2018-11-04, 17:10


droper24hp







Wiek: 25
Na forum: 3201 dni
Posty: 14
Nick w MP: Droper24hp



Respekt: 50

error: admin/client/admin_client.lua:129:attempt to call a nil value
"NotPaladyn" napisał/a:

Na pewno spr?bujemy pom?c
Wpisz komende /debuscript 3
Oraz jesli b?d? tam widoczne ?e s? jakie? b??dy to napisz nam tu jakie lub zrob ss i daj go tutaj

"Kalizman" napisał/a:

b?edy db3


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-04, 18:08


Kalizman







Wiek: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

droper24hp, podaj kod admin_client.lua z pliku admin linijka 129....









a tak na powaznie podaj bledy db3 z tego skryptu!!!

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-04, 18:30


droper24hp







Wiek: 25
Na forum: 3201 dni
Posty: 14
Nick w MP: Droper24hp



Respekt: 50

Eror: loading script failed: Dilerka_praca/server.lua:171: 'end' expected <to close 'inf' at line 62> near '<eof>'
Oto ci chodzi ? w consoli wpisa?o od 129 linki

function startJobEtap(plr)
    if (plr==localPlayerthen
        if getElementData(plr,"player:job:materialy:etap") == 1 then
            if playerpoints >= maxpoints then
                setElementData(plr,"player:job:materialy:etap",2)
                startJobEtap(plr)
                return
            end
            marker createMarker(-1834.969241035.8076246.0878592.075073242188-1.2,"cylinder",1.5,255,255,0,200)
            setElementInterior(marker0)
            addEventHandler("onClientMarkerHit",marker,function(plr)
                if (plr==localPlayerthen
                    if getElementData(plr,"player:job"then
                        toggleControl("sprint",false)
                        toggleControl("enter_exit",false)
                        toggleControl("jump",false)
                        triggerServerEvent("giveObject:buildingjob",plr,plr)
                        destroyElement(marker)
                        
                        markern createMarker(-1824.585691027.9046645.23264-1.2,"cylinder",1.5,255,255,0,150)
                        setElementInterior(markern0)
                        addEventHandler("onClientMarkerHit",markern,function(plr)
                            if (plr==localPlayerthen
                                if getElementData(plr,"player:job"then
                                    if not isPedInVehicle(plrthen 
                                        triggerServerEvent("destroyElement:buildingjob",plr,plr)
                                        
                                        destroyElement(markern)
                                        playerpoints tonumber(playerpoints) + 1
                                        
                                        toggleControl("sprint",true)
                                        toggleControl("enter_exit",true)
                                        toggleControl("jump",true)
                                        
                                        startJobEtap(plr)
                                    end
                                end
                            end
                        end)
                    end
                end
            end)
        end

        if getElementData(plr,"player:job:materialy:etap") == 2 then
            setElementFrozen(plr,true)
            setTimer(function()
            setElementInterior(plr,0)
                triggerServerEvent("createVehicle:buildingjob",plr,plr)
                local rnd math.random(1,#pointsNEXT)
                point createMarker(pointsNEXT[rnd][1],pointsNEXT[rnd][2],pointsNEXT[rnd][3]-2,"cylinder",4,0,0,255,150)
                blip createBlipAttachedTo(point,12)
                addEventHandler("onClientMarkerHit",point,function(plr)
                    if (plr==localPlayerthen
                        if getElementData(plr,"player:job"then
                            if isPedInVehicle(plrthen
                                outputChatBox("?wietna robota! Za godn? podziwu prac? otrzymujesz wynagrodzenie!",0,255,0)
                                setElementData(plr,"player:job",false)
                                setElementData(plr,"player:job:materialy:etap",false)
                                triggerServerEvent("destroyElement:buildingjob",plr,plr)
                                triggerServerEvent("destroyVehicle:buildingjob",plr,plr)
                                endJob(plr)
                                setElementData(plr,"DM:unlock",true)
                                local kasa math.random(200000,225000)
                                                                local kasapremium math.random(225000,250000)
                                                                if getElementData(localPlayer,"player:premium"then
                                                                givePlayerMoney(kasapremium)
                                                            else
                                                            givePlayerMoney(kasa)
                                                                end
                                fadeCamera(false)
                                setTimer(function()
                                    fadeCamera(true)
                                end,3500,1)
                                playerpoints 0
                                timerrrrr[plr] = setTimer(function()
                                    setElementPosition(plr,-1843.88684995.0822845.85445)
                                end,2500,1)
                            else
                                endJob(plr)
                            end
                        else
                            endJob(plr)
                        end
                    end
                end)
            end,1000,1)
        end
    end
end
                                                               
addEventHandler("onClientVehicleExit",resourceRoot,function(plr,seat)
    if plr == localPlayer then
    
        endJob(plr)
        setElementData(plr,"player:job",false)
        setElementData(plr,"player:job:materialy:etap",false)
        triggerServerEvent("destroyElement:buildingjob",plr,plr)
        triggerServerEvent("destroyVehicle:buildingjob",plr,plr)
        playerpoints 0
    end
end)

addEventHandler("onClientPlayerWasted",root,function()
    if source == localPlayer then
        endJob(source)
        setElementData(source,"player:job",false)
        setElementData(source,"player:job:materialy:etap",false)
        triggerServerEvent("destroyElement:buildingjob",source,source)
        triggerServerEvent("destroyVehicle:buildingjob",source,source)
        playerpoints 0
    end
end)

fileDelete("client.lua")
"Kalizman" napisał/a:

droper24hp, podaj kod admin_client.lua z pliku admin linijka 129....









a tak na powaznie podaj bledy db3 z tego skryptu!!!


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-04, 19:54


Kalizman







Wiek: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

brakuje end?w od funkcji czy od instrukcji warunkowych

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-04, 22:02


droper24hp







Wiek: 25
Na forum: 3201 dni
Posty: 14
Nick w MP: Droper24hp



Respekt: 50

"Kalizman" napisał/a:

brakuje end?w od funkcji czy od instrukcji warunkowych
a pomo?esz zrobi? ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-05, 11:46


Eitho







Wiek: 24
Na forum: 3489 dni
Posty: 330
Nick w MP: Eitho

Piwa: 746

Respekt: 256,5
Respekt: 256,5Respekt: 256,5Respekt: 256,5

"droper24hp" napisał/a:

Eror: loading script failed: Dilerka_praca/server.lua:171: 'end' expected <to close 'inf' at line 62> near '<eof>'
Oto ci chodzi ? w consoli wpisa?o od 129 linki

function startJobEtap(plr)
    if (plr==localPlayerthen
        if getElementData(plr,"player:job:materialy:etap") == 1 then
            if playerpoints >= maxpoints then
                setElementData(plr,"player:job:materialy:etap",2)
                startJobEtap(plr)
                return
            end
            marker createMarker(-1834.969241035.8076246.0878592.075073242188-1.2,"cylinder",1.5,255,255,0,200)
            setElementInterior(marker0)
            addEventHandler("onClientMarkerHit",marker,function(plr)
                if (plr==localPlayerthen
                    if getElementData(plr,"player:job"then
                        toggleControl("sprint",false)
                        toggleControl("enter_exit",false)
                        toggleControl("jump",false)
                        triggerServerEvent("giveObject:buildingjob",plr,plr)
                        destroyElement(marker)
                        
                        markern createMarker(-1824.585691027.9046645.23264-1.2,"cylinder",1.5,255,255,0,150)
                        setElementInterior(markern0)
                        addEventHandler("onClientMarkerHit",markern,function(plr)
                            if (plr==localPlayerthen
                                if getElementData(plr,"player:job"then
                                    if not isPedInVehicle(plrthen 
                                        triggerServerEvent("destroyElement:buildingjob",plr,plr)
                                        
                                        destroyElement(markern)
                                        playerpoints tonumber(playerpoints) + 1
                                        
                                        toggleControl("sprint",true)
                                        toggleControl("enter_exit",true)
                                        toggleControl("jump",true)
                                        
                                        startJobEtap(plr)
                                    end
                                end
                            end
                        end)
                    end
                end
            end)
        end

        if getElementData(plr,"player:job:materialy:etap") == 2 then
            setElementFrozen(plr,true)
            setTimer(function()
            setElementInterior(plr,0)
                triggerServerEvent("createVehicle:buildingjob",plr,plr)
                local rnd math.random(1,#pointsNEXT)
                point createMarker(pointsNEXT[rnd][1],pointsNEXT[rnd][2],pointsNEXT[rnd][3]-2,"cylinder",4,0,0,255,150)
                blip createBlipAttachedTo(point,12)
                addEventHandler("onClientMarkerHit",point,function(plr)
                    if (plr==localPlayerthen
                        if getElementData(plr,"player:job"then
                            if isPedInVehicle(plrthen
                                outputChatBox("?wietna robota! Za godn? podziwu prac? otrzymujesz wynagrodzenie!",0,255,0)
                                setElementData(plr,"player:job",false)
                                setElementData(plr,"player:job:materialy:etap",false)
                                triggerServerEvent("destroyElement:buildingjob",plr,plr)
                                triggerServerEvent("destroyVehicle:buildingjob",plr,plr)
                                endJob(plr)
                                setElementData(plr,"DM:unlock",true)
                                local kasa math.random(200000,225000)
                                                                local kasapremium math.random(225000,250000)
                                                                if getElementData(localPlayer,"player:premium"then
                                                                givePlayerMoney(kasapremium)
                                                            else
                                                            givePlayerMoney(kasa)
                                                                end
                                fadeCamera(false)
                                setTimer(function()
                                    fadeCamera(true)
                                end,3500,1)
                                playerpoints 0
                                timerrrrr[plr] = setTimer(function()
                                    setElementPosition(plr,-1843.88684995.0822845.85445)
                                end,2500,1)
                            else
                                endJob(plr)
                            end
                        else
                            endJob(plr)
                        end
                    end
                end)
            end,1000,1)
        end
    end
end
                                                               
addEventHandler("onClientVehicleExit",resourceRoot,function(plr,seat)
    if plr == localPlayer then
    
        endJob(plr)
        setElementData(plr,"player:job",false)
        setElementData(plr,"player:job:materialy:etap",false)
        triggerServerEvent("destroyElement:buildingjob",plr,plr)
        triggerServerEvent("destroyVehicle:buildingjob",plr,plr)
        playerpoints 0
    end
end)

addEventHandler("onClientPlayerWasted",root,function()
    if source == localPlayer then
        endJob(source)
        setElementData(source,"player:job",false)
        setElementData(source,"player:job:materialy:etap",false)
        triggerServerEvent("destroyElement:buildingjob",source,source)
        triggerServerEvent("destroyVehicle:buildingjob",source,source)
        playerpoints 0
    end
end)

fileDelete("client.lua")
"Kalizman" napisał/a:

droper24hp, podaj kod admin_client.lua z pliku admin linijka 129....









a tak na powaznie podaj bledy db3 z tego skryptu!!!


Tu co? ci si? kod urwa?, nie napisz? go bo nie wiem co tam by?o, ale pozamyka?em event i instrukcje warunkow?
local vehicles = {
{2568,-1302.5,1044.19,0,0,270},
}

local text createElement("text")
setElementData(text"scale"1)
setElementData(text,"name""Nielegalna praca\nMarihuana\nWymagania: Brak\nRadzimy uwa?a? na policj? kt?ra raz na jaki? czas si? tutaj kr?ci")
setElementPosition(text,-1843.34863993.21570,44.4+1.2)

for _,v in ipairs(vehicles) do
    local vehicle createVehicle(499,v[1],v[2],v[3],v[4],v[5],v[6])
    setElementFrozen(vehicle,true)
    setVehicleLocked(vehicle,true)
    setVehicleVariant(vehicle,2,2)
    setElementData(vehicle,"pojazdpracy",true)
    setVehicleColor(vehicle,175,118,007,088,114,070)
    setElementInterior(vehicle0)
end


object = {}
veh = {}

addEvent("giveObject:buildingjob",true)
addEventHandler("giveObject:buildingjob",root,function(plr)
    if plr then
        object[plr] = createObject(1704,0,0,0,0,0,0)
        setElementCollisionsEnabled(object[plr],false)
        setElementDoubleSided(object[plr],true)
        setObjectScale(object[plr],0.8)
        attachElements(object[plr],plr,-0.35,0.6,0,0,0,0,0)
        setTimer(setPedAnimation,50,1,plr,"CARRY","crry_prtial",1)
        setElementInterior(object[plr], 0)
    end
end)

addEvent("destroyElement:buildingjob",true)
addEventHandler("destroyElement:buildingjob",root,function(plr)
    if plr then
        if object[plr] and isElement(object[plr]) then
            destroyElement(object[plr])
        end
        setPedAnimation(plr,"CARRY","crry_prtial",1,true,false,true,false)
    end
end)






addEventHandler("onVehicleStartEnter",resourceRoot,function(plr,seat)
    if seat == 0 then
        cancelEvent()
    end
end)



addEventHandler("onMarkerHit"getRootElement(), function(el,md)
    if source == rozpraca then
        if getElementType(el) == "vehicle" then return end
        if getPedOccupiedVehicle(elthen return end
        if getElementData(el"player:job"then outputChatBox("* Posiadasz rozpocz?t? prac?!",el)    return end
        outputChatBox("Rozpocz??e? prac? Dilerk?!",el255255255)
        setElementData(el"player:job","Marycha")
        triggerClientEvent(el"marycha"elmd)
        toggleControl(el,"enter_exit"false)
    elseif source == zakpraca then
        if getElementType(el) == "vehicle" then return end
        if getPedOccupiedVehicle(elthen return end


        
    end
end)






t1 = {}
t2 = {}
t3 = {}

local pv = {
    {-2639.826901438.574957.07637000},
    {-2630.102781430.969127.07525000},

}

addEvent("createVehicle:buildingjob",true)
addEventHandler("createVehicle:buildingjob",root,function(plr)
    if plr then
        local rnd math.random(1,#pv)
        
        veh[plr] = createVehicle(499,pv[rnd][1],pv[rnd][2],pv[rnd][3],pv[rnd][4],pv[rnd][5],pv[rnd][6],"Meble")
        setElementInterior(veh[plr], 0)
        setElementInterior(plr0)
        setVehicleVariant(veh[plr],2,2)
        setVehicleColor(veh[plr],088,114,070,088,114,070)
        setVehicleLocked(veh[plr],true)
        fadeCamera(plr,false)
        warpPedIntoVehicle(plr,veh[plr])
        t1[plr] = setTimer(function()
            fadeCamera(plr,true)
            setElementFrozen(plr,false)
        end,2000,1)
        outputChatBox("Teraz wystarczy dostarczy? ?adunek! Miejsce zosta?o oznaczone na minimapie!",plr,0,255,0,true)
    end
end)

addEvent("destroyVehicle:buildingjob",true)
addEventHandler("destroyVehicle:buildingjob",root,function(plr)
    if plr then
        if veh[plr] and isElement(veh[plr]) then
            t2[plr] = setTimer(function()
                destroyElement(veh[plr])
                if t2[plr] and isTimer(t2[plr]) then killTimer(t2[plr]) end
            end,1000,1)
        end
        setElementData(plr,"player:job:materialy:etap",false)
        setElementData(plr,"player:job",false)
    end
end)



addEventHandler("onPlayerQuit",root,function()
    if getElementData(source,"login") == getPlayerName(sourcethen
        triggerEvent("destroyElement:buildingjob",source,source)
    end
end)

addCommandHandler("plrjob",function(plr,cmd)
    if getElementData(plr,"ACL") == "admin" then
        setElementData(plr,"player:job",false)
    end
end)


function isVehicleEmpty(vehicle)
    if not isElement(vehicle) or getElementType(vehicle) ~= "vehicle" then return true end
    local passengers getVehicleMaxPassengers(vehicle)
    if type(passengers) == "number" then
        for seat 0passengers do
            if getVehicleOccupant(vehicle,seatthen return false end
        end
    end
    return true
end

setTimer(function()
    for _,v in ipairs(getElementsByType("vehicle",resourceRoot)) do
        if isVehicleEmpty(vthen
            if getElementData(v,"pojazdpracy") == false then
                destroyElement(v)
            end
        end
    end
end,15000,0)


Podpis
good old days :]
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
droper24hp
Wysłany: 2018-11-05, 16:03


droper24hp







Wiek: 25
Na forum: 3201 dni
Posty: 14
Nick w MP: Droper24hp



Respekt: 50

nie dzia?a

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-05, 17:08


Kalizman







Wiek: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

mo?e podasz db3 czy mamy zgadywa??

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-06, 13:35


DomineQ

lua mejster






Wiek: 22
Na forum: 3960 dni
Posty: 309
Nick w MP: EZ3N

Piwa: 5186

Respekt: 85,8

dodaj enda na koniec funkcji w ktorej wystepuje blad.

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-06, 15:56


droper24hp







Wiek: 25
Na forum: 3201 dni
Posty: 14
Nick w MP: Droper24hp



Respekt: 50

ja napa?em debuscript 3 i nie dzia?a nic tera nie wy swietla

[ Dodano: 2018-11-06, 15:57 ]
"DomineQ" napisał/a:

dodaj enda na koniec funkcji w ktorej wystepuje blad.

jakej funkcji?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-11-06, 17:12


DomineQ

lua mejster






Wiek: 22
Na forum: 3960 dni
Posty: 309
Nick w MP: EZ3N

Piwa: 5186

Respekt: 85,8

"droper24hp" napisał/a:

ja napa?em debuscript 3 i nie dzia?a nic tera nie wy swietla

[ Dodano: 2018-11-06, 15:57 ]
"DomineQ" napisał/a:

dodaj enda na koniec funkcji w ktorej wystepuje blad.

jakej funkcji?


Cytat:

w ktorej wystepuje blad.


Podpis
Postaw piwo autorowi tego posta
 

 
Tagi: prosze :: pomóc :: praca :: dilera :: nie :: działa
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Prosze pomóc Praca Dilera nie działa 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