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

Wysłany: 2019-02-09, 17:49


smigi







Wiek: 23
Na forum: 3367 dni
Posty: 60
Nick w MP: smigi

Piwa: 2

Respekt: 50

Witam chcia?bym tutaj dodac np dwie skrzynki ale jak dodaje to jedna znika a druga nie nie wiem o co chodzi pomoze ktos?



local praca createMarker(246.17,-53.87,0.58"cylinder"1.00,100,080)
local t=createElement("text")
setElementData(t,"name""Praca przenoszenie Butelek\nZarobki:\nGracz:50k Premium 75k")
setElementPosition(t,246.17,-53.87,1.58)
setElementDimension(t0)
setElementInterior(t0)


local miejscamagazynier = {
    {244.31,-57.83,1.58}, 
    {244.73,-60.18,1.58},
    {248.59,-60.19,1.57},
    {251.17,-60.18,1.57},
    {255.66,-59.18,1.57},
    {255.58,-56.94,1.57},
    {255.38,-54.68,1.57},
    {251.71,-58.15,1.57},
    {249.84,-58.24,1.57},
}

addEventHandler("onClientMarkerHit"praca, function(elmd)
    if not md or getElementType(el) ~= "player" then return end
    if el ~= localPlayer then return end
    outputChatBox("I Aby rozpocz?? prac? wci?nij 'e' I")
end)


bindKey("e""down", function()
    if not isElementWithinMarker(localPlayerpracathen return end
    if not getElementData(localPlayer"player:job"then
        local losuj math.random(2#miejscamagazynier)
        setElementData(localPlayer"player:job"true)
        setPedAnimation localPlayer"CARRY""crry_prtial"1,true )

        local skrzynia createObject(1486111)
        attachElements skrzynialocalPlayer00.40.4)
        
        local cel createMarker(miejscamagazynier[losuj][1], miejscamagazynier[losuj][2], miejscamagazynier[losuj][3]-1.0"checkpoint"1.025500)
        local blip createBlipAttachedTo(cel41)
        
        addEventHandler("onClientMarkerHit"cel, function(elmd)
            if not md or getElementType(el) ~= "player" then return end
            if el ~= localPlayer then return end

            if getPedOccupiedVehicle(elthen
            outputChatBox(" Nie mo?esz tego od?o?y? b?d?c w poje?dzie !")
                return
            end


            destroyElement(blip)
            setElementFrozen(eltrue)
            outputChatBox(" Odk?adasz piwo, odczekaj 5 sekund.")
            setTimer(function()
                setElementFrozen(elfalse)
                destroyElement(skrzynia,skrzynia1)
                destroyElement(cel)
                setPedAnimation(localPlayerfalse)
                setElementData(el"player:job"false)
                if getElementData(el,"player:premium"then
                outputChatBox(" Za od?o?enie piwa, otrzymujesz 75000 PLN.")
                triggerServerEvent("givePlayerMoney"el750000)
                setElementData(el,"player:srp"getElementData(el,"player:srp")+math.random(0,5))
                else
                outputChatBox("")
                triggerServerEvent("givePlayerMoney"el500000)
                setElementData(el,"player:srp"getElementData(el,"player:srp")+math.random(0,2))
                end
            end40001)
        end)
    else
        outputChatBox(" Posiadasz aktywn? prac?.")
    end
end)


addEventHandler("onClientResourceStop"resourceRoot, function()
 setElementData(localPlayer"player:job"false)
end,false,"high")

fileDelete("praca_c.lua")


[ Dodano: 2019-02-10, 15:37 ]
Pomo?e kto?!?

Postaw piwo autorowi tego posta
 

 
Tagi: praca
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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