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

Wysłany: 2018-06-23, 21:13


olafex







Wiek: 30
Na forum: 3474 dni
Posty: 9



Respekt: 40

Witajcie,
wie kto? mo?e jak zrobi? to tak aby respi? sie beagle i ?eby zabiera? wi?cej ludzi oraz wi?cej blip?w mia? odrazu ?

-- Settings
local thePed
local missionBlip
local missionMarker    
local missionVehicle
local money 3500 -- Ile za zrzut sie dostaje $$$$$$$$$$$$$$$$$$
local code="Transport spadochroniarzy"
local missionPoints={ 
{-1708.89,-508.21,140.34},
{-2154.34,-302.58,73.34},
{-2506.44,-467.21,124.24},
{-2734.23,-180.91,55.24},
{-2568.56,500.52,94.24},
{-1824.01,544.56,302.44},
{-1938.02,655.46,154.64},
{-2050.03,1058.08,111.44},
{-1647.69,1386.32,30.54},
{-1031.71,478.77,84.54},
{-750.09,-163.96,84.54},


}



local missionZaladunek=createMarker(-1175.07,26.94,12.15,"cylinder",5,0,128,128)

local jobText=createElement("text")
setElementPosition(jobText, -1227.53,47.71,14.13)
setElementData(jobText"name""Praca Dorywcza Zrzut Spadochroniarzy")

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
        if isElement(thePed) and thePed then
            destroyElement(thePed)
            thePed=nil
        end
    end
    if value2 == true then
        if isElement(missionVehicle) and missionVehicle then
            triggerServerEvent("destroyVehicle"rootmissionVehicle)
            missionVehicle=nil
        end
    end
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)
    outputChatBox("* Spadochroniarz skacz?...")
    triggerServerEvent("DropPed",resourceRoot,veh)
    setTimer(function()
        playSound(":ogrpg-misc/misc/success.flac")
        finishJob(el,true,false)
        outputChatBox("* Dostarczy?e?(a?) spadochroniarza na miejsce zrzutu.")
        addEventHandler("onClientRender",root,render1)  
        triggerServerEvent("givePlayerMoney"elmoney5)
        outputChatBox("* Otrzymujesz 60 PLN za zrzut, wracaj na lotnisko po kolejnych spadochroniarza.")
    end50001)
end

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




addEventHandler("onClientMarkerHit"missionZaladunek, function(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
    if getElementModel(veh) ~= 593 then return end
    if isElement(missionMarker) or isElement(missionBlipthen
        outputChatBox("* Nie mo?esz za?adowa? spadochroniarzy, posiadasz pe?n? kabine"25500)
        return
    end
    setElementFrozen(veh,true)
    outputChatBox("* ?adujesz spadochroniarza.")
    triggerServerEvent("CreatePed",resourceRoot,veh)
    setTimer(function()
        playSound(":ogrpg-misc/misc/point.wav")
        showMarker()
        setElementFrozen(veh,false)
        outputChatBox("* Za?adowa?e?(a?) spadochroniarza,punkt zrzutu zosta? oznaczony blipem (C) na radarze.")
    end10001)
end)

addEventHandler("onClientPlayerQuit"root, function()
    finishJob(source,false,true)
end)

addEventHandler("onClientPlayerWasted"root, function()
    finishJob(source,true,true)
end)

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

addEventHandler("onClientVehicleExplode"resourceRoot, function()
    if getElementModel(source) ~= 593 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?."25500)
end)

addEvent("startJob"true)
addEventHandler("startJob"resourceRoot, function(veh)
    missionVehicle=veh
    setElementData(localPlayer,"player:job",code)
    outputChatBox("* Rozpocz??e?(a?) prac?, za?aduj spadochroniarza.")
end)

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





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."25500)
        return
    end
    if getElementData(plr,"player:job"then
        outputChatBox("* Ju? posiadasz aktywn? prac?."25500)
        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("* Rozpocz??e?.")
    end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-06-23, 21:22


Kalizman







Wiek: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

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

Mo?esz bardziej wyja?ni? co chcia?by? napisa?/dopisa?/poprawi??

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-06-23, 22:01


olafex







Wiek: 30
Na forum: 3474 dni
Posty: 9



Respekt: 40

Chodzi mi o to, aby z tego skryptu nie byl on taki zeby bral po 1 pasa?erze tylko po kilki i zamiast jednego blipa i powr?t to kilka blip?w/marker?w

Postaw piwo autorowi tego posta
 

 
Tagi: jak :: ustawic :: ten :: skrypt
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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