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

Wysłany: 2017-05-10, 21:58


MichalskY







Wiek: 31
Na forum: 3405 dni
Posty: 24



Respekt: 20,5

Witam, mam problem z dodaniem blip?w do "missionPointsD" na radarze. Og?lnie to pr?bowa?em je zrobi? i odziwo mi si? uda?o lecz po wleceniu w markery one nie znika?y. dam czysty kod mo?e kto? z was by to wykona?. (pisalem w pro?bie o przerobienie skryptu ale nikt sie nie odzywa -,- )


createBlip 1393.811251.2810.82462255002550400local missionTimer
local missionVehicle
local missionWysypiskaD = {
    {1393.811251.2810.82}, 
}
local missionPointsD = {


    {1510.021469.23183.85},
    {1454.081620.11183.85},
    {1339.481593.27183.85},
    {1432.731780.4671.95},
    {1428.171948.3462.25},
    {1437.012124.7742.10},
    {1487.962203.8069.20},
    {1538.712197.8569.20},
    {1657.532177.7169.20},
   

}
local countMarkers=#missionPointsD

for i,v in ipairs(missionWysypiskaD) do
    local marker=createMarker(v[1], v[2], v[3]-1"cylinder"4071255,100)
    createPickup v[1], v[2], v[3]+131318 )
    setElementData(marker,"wysypisko",true)
    --createBlipAttachedTo(marker52)
    

    local t=createElement("text")
    setElementData(t,"name","Miejsce oddania\nzebranych danych!")
    setElementPosition(tv[1], v[2], v[3])
end

function showMarker()
     for i,rnd in ipairs(missionPointsD) do
        markerr=createMarker(rnd[1], rnd[2], rnd[3], "arrow"7080180,255)


       
       setElementData(markerr,"wlasnosc",getPlayerName(localPlayer))

     end
end

addEventHandler("onClientVehicleExit",root,function (plr,seat)
    if plr == localPlayer and seat == and getElementData(source,"zapelnienie"then
        triggerServerEvent("cancelJob",resourceRoot,source)
        setElementData(plr,"player:job",nil)
        for i,v in ipairs(getElementsByType("marker")) do
            if getElementData(v,"wlasnosc") == getPlayerName(plrthen
                destroyElement(v)
            end
        end
    end
end)

addEventHandler("onClientMarkerHit"resourceRoot, function(el,md)
    if el~=localPlayer then return end
    local veh=getPedOccupiedVehicle(localPlayer)
    if not veh then return end -- nie powinno sie wydarzyc
    if getVehicleController(veh) ~= localPlayer then return end
        if getElementData(veh,"vehicle:pracaD") and getElementData(veh,"vehicle:pracaD")=="Dodo" then
            if getElementData(source,"wysypisko"then
            local zapelnienie getElementData(veh,"zapelnienie")
            --outputChatBox(zapelnienie)
                if zapelnienie and zapelnienie == 0 then -- procenty
                   outputChatBox ("#0055B5☞  #FFFFFFTw?j dysk jest pusty."255255255true )
                return
                end
            
            if countMarkers == 0 then
            showMarker()
            end
        setElementData(veh,"zapelnienie",0)
        setElementData(veh,"vehicle:desc","Dane 0%")
        triggerServerEvent("wyplacPieniadze"localPlayerzapelnienie)
        return
        end
    if countMarkers == 0 then
        showMarker()
    else
        local zapelnienie=getElementData(veh,"zapelnienie")
        if zapelnienie and zapelnienie >= 100 then -- procenty
            outputChatBox("#0055B5☞  #FFFFFFPosiadasz ju? #919191: "..zapelnienie.."#0053FFGB."25500true )
            return
        end
        marker=source
        --outputChatBox("#0053FF Trwa Ladowanie..."000true )
        
        if not isTimer(missionTimerthen
            missionTimer=setTimer(function()
                countMarkers=countMarkers-1
                local poziom=getElementData(veh,"zapelnienie") or 0
                poziom=math.min(poziom+math.random(1,3),100)
                setElementData(veh,"zapelnienie"poziom)
                setElementData(veh,"vehicle:desc","Dane: "..poziom.."%")
                outputChatBox("#0055B5☞  #FFFFFFZawartosc Dysku#919191: "..poziom.."%"000true)
                destroyElement(marker)
            end5001)
        else
            killTimer(missionTimer)
        end
     end
end
end)

setTimer(function()
    for _,player in ipairs(getElementsByType("player")) do
        if getElementData(player,"player:job") == "Generator" then
            if not getPedOccupiedVehicle(player) and getPedOccupiedVehicle(player) ~= missionVehicle then
                for _,marker in ipairs(getElementsByType("marker"resourceRoot)) do
                    if getElementData(marker,"wlasnosc") == getPlayerName(playerthen
                        destroyElement(marker)
                        setElementData(player"player:job"false)
                    end
                end
            end
        end
    end
end10000)

addEventHandler("onClientVehicleEnter"resourceRoot, function(plr,seat)
     if plr~=localPlayer then return end
     if seat~=0 then return end
     missionVehicle=source
     setElementData(source,"zapelnienie",0)
     setElementData(source,"vehicle:desc","Dane: 0%")
     setElementData(plr,"player:job","Generator")
     outputChatBox ("#0055B5☞  #FFFFFFRozpoczynasz prace, lataj nad #0055B5Las Venturas i zbieraj dane."255255255true )
     outputChatBox ("#0055B5☞  #FFFFFFPo uzbieraniu min 1% mozesz odeslac zapisana mape na #0053FFStacji#919191."255255255true )
     outputChatBox ("#0055B5☞  #FFFFFFOznaczonej #0055B5W  #FFFFFF na lotnisku LV."255255255true )
     showMarker()
end)

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


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-05-11, 00:33


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

Z tego co widze nie tworzysz blipa tylko pickup i nigdzie tego nie usuwasz.

Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-05-11, 09:05


MichalskY







Wiek: 31
Na forum: 3405 dni
Posty: 24



Respekt: 20,5

Chodzi mi o funkcje showMarker. Pokazuje si? marker a chcia?bym jeszcze by pokazywa? si? blip na radarze. Gdy wlatuje w marker to marker znika. Robi?em ten blip i pokazywa? si? tam gdzie marker ale po wleceniu w marker blip nie znika?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-05-11, 12:15


.RiV







Wiek: 25
Na forum: 3587 dni
Posty: 554
Nick w MP: Split

Piwa: 2596

Respekt: 597,8
Respekt: 597,8

?ap:

https://pastebin.com/mpvQE5NG

Uzupe?nij to:

local ID_BLIPA 12 -- ID BLIPA uzupe?nij!


Podpis

Autor OGRPG, na scenie MTA od 2012 roku.




Użytkownik: 08.08.2016
GTAO Member: 06.02.2017
Support-Team: 17.06.2017 & 01.06.2019 - 18.11.2019
Moderator: 14.01.2018 - 09.08.2018

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-05-11, 16:06


MichalskY







Wiek: 31
Na forum: 3405 dni
Posty: 24



Respekt: 20,5

nadal to samo. po wleceniu w marker blip nie znika. i po wyj?ciu z samolotu tez nie usuwa blip?w :/

Postaw piwo autorowi tego posta
 

 
Tagi: blipy :: pracy :: radarze
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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