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

Wysłany: 2015-12-23, 21:15


Marcinos651







Wiek: 28
Na forum: 4480 dni
Posty: 18
Nick w MP: Marcin651



Respekt: 50

Witam. Potrzebuj? ?eby po przyj?ciu zlecenia dawalo blipa id 41 bo nie da sie dojechac bo nie ma lokalizacji a nikt w slepo jezdzic nie bedzie.
Nie mog? za nic tego ogarn??

Dam piwko ka?demu kto mi pomo?e ;)



Client-


createBlip( -1853.0203857422115.515487670914.117187552) -- miejsce pracy dorywczej "kopalnia"

local marker_zacznijprace createMarker ( -1853.0203857422115.515487670914.1171875"cylinder"32550085 ) -- marker w kt?rym zaczyna siprace

local cele = -- cele kopalnii
{
    { -1805.08,999.21,23.89 };
    { -2016.65,970.11,44.56 };
    { -1955.51,1188.48,44.45 };
    { -1617.51,1074.92,6.19 };
    { -1581.15,865.56,6.60 };
}


addEventHandler("onResourceStart",marker_zacznijprace,
function(panel) 
    if panel == gracz and not isPedInVehicle(graczthen 
        guiSetVisible(marker_zacznijprace,true) 
        showCursor(true) 
    end 
end)



function marker_cel ()
    return unpack cele math.random #cele ) ] )
end



                                                                           -- [[ Panel Pracy Dorywczej ]] --
                                                                           
----------------------------------------------------------------------------------------------------------------------------------------------------                                                                           
sx,sy guiGetScreenSize()
gracz getLocalPlayer()
pieniadze math.random(1,2)
----------------------------------------------------------------------------------------------------------------------------------------------------
praca_panel guiCreateWindow(541/1366*sx112/768*sy363/1366*sx416/768*sy,"Praca w Kopalni"false)
guiWindowSetSizable(praca_panelfalse)
guiSetAlpha(praca_panel0.70)
----------------------------------------------------------------------------------------------------------------------------------------------------
tekst guiCreateMemo(25/1366*sx115/768*sy314/1366*sx123/768*sy"     Praca G?rnik\n     Zarobki: 300-500$"falsepraca_panel)
----------------------------------------------------------------------------------------------------------------------------------------------------

label guiCreateLabel(15/1366*sx19/768*sy334/1366*sx46/768*sy"       Praca Dorywcza by Milo. Zakaz Usuwania Autora!"falsepraca_panel)
guiSetFont(label"default-bold-small")
----------------------------------------------------------------------------------------------------------------------------------------------------
zaczyna_prace guiCreateButton(52/1366*sx264/768*sy260/1366*sx57/768*sy"Zacznij Prac?"falsepraca_panel)
guiSetProperty(zaczyna_prace"NormalTextColour""FFAAAAAA")
----------------------------------------------------------------------------------------------------------------------------------------------------
skoncz_prace guiCreateButton(52/1366*sx337/768*sy260/1366*sx57/768*sy"Wy??cz Panel"falsepraca_panel)
guiSetProperty(skoncz_prace"NormalTextColour""FFAAAAAA")  
guiSetVisible (praca_panel,false)
guiMemoSetReadOnly(tekst,true)
guiWindowSetMovable (praca_panel,true )
guiWindowSetSizable (praca_panel,false )

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

dalsza_praca guiCreateWindow(522232353138""false)

----------------------------------------------------------------------------------------------------------------------------------------------------
tekstt guiCreateLabel(118/1366*sx24/768*sy246/1366*sx30/768*sy"Chcesz dalej pracowa??"falsedalsza_praca)

----------------------------------------------------------------------------------------------------------------------------------------------------
dalej guiCreateButton(206714444"TAK"falsedalsza_praca)

----------------------------------------------------------------------------------------------------------------------------------------------------
koniec guiCreateButton(1856714444"NIE"falsedalsza_praca)

----------------------------------------------------------------------------------------------------------------------------------------------------
guiWindowSetSizable(dalsza_pracafalse)
guiWindowSetMovable(dalsza_pracatrue)
guiSetVisible (dalsza_pracafalse)






addEventHandler("onClientGUIClick",praca_panel,
function(liczba,thePlayer)
    if liczba == "left" then
        if source == zaczyna_prace then
            outputChatBox ("((Teraz wejdz ponownie w marker aby wzi??? pojazd!))",225,225,225true)
            guiSetVisible(praca_panel,false)
            guiSetVisible(zaczyna_prace,false)
            showCursor(false)
            --
            wez_pojazd guiCreateButton(52/1366*sx264/768*sy260/1366*sx57/768*sy"We? Pojazd"falsepraca_panel)
            koncz guiCreateButton(52/1366*sx337/768*sy260/1366*sx57/768*sy"Wy??cz Panel"falsepraca_panel)
            guiSetAlpha(koncz0.0)
            --
            end
        end
    end
)

addEventHandler("onClientGUIClick",praca_panel,
function(liczba,thePlayer)
    if liczba == "left" then
        if source == skoncz_prace then
        guiSetVisible(praca_panel,false)
        showCursor(false)
    end
  end
end)

addEventHandler("onClientGUIClick",praca_panel,
function(liczba,thePlayer)
    if liczba == "left" then
        if source == koncz then
        guiSetVisible(praca_panel,false)
        guiSetVisible(koncz,false)
        guiSetVisible(wez_pojazd,false)
        guiSetVisible(offduty,false)
        guiSetVisible(skoncz_prace,true)
        guiSetVisible(zaczyna_prace,true)
        showCursor(false)
        destroyElement pojazdmarker )
        destroyElement blipcelu )
    end
  end
end)
    
addEventHandler("onClientGUIClick",praca_panel,
function(liczba,thePlayer)
    if liczba == "left" then
        if source == wez_pojazd then
        outputChatBox ("((Jeste? ju? w poje?dzie jed? do wyznaczonego celu))",thePlayer,225,225,225true)
        triggerServerEvent "praca_dorywcza"gracz)
        triggerServerEvent "dajepojazd"gracz)
        guiSetVisible(praca_panel,false)
        guiSetVisible(koncz,true)
        guiSetVisible(zaczyna_prace,false)
        guiSetVisible(wez_pojazd,false)
        guiSetVisible(skoncz_prace,true)
        showCursor(false)
        end
    end
end)


        
addEventHandler("onClientMarkerHit",marker_zacznijprace,
    function(panel)
        if panel == gracz and not isPedInVehicle(graczthen
            guiSetVisible(praca_panel,true)
            showCursor(true)
        end
    end
)


addEventHandler "onClientMarkerHit"root,
    function ( hitElement )
        if source == pojazdmarker and localPlayer == hitElement  then
        local pojazd getPedOccupiedVehicle localPlayer )
        if pojazd and getElementModel(pojazd) == 524 then -- pojazd 
            triggerServerEvent "dostaje_pieniadze"localPlayer )
            destroyElement pojazdmarker )
 
            if isElement(blipceluthen 
            destroyElement blipcelu ) -- usuwa blip celu 
end
 
            guiSetVisible(dalsza_praca,true)
            showCursor(true)
        end
    end
end)




addEventHandler("onClientGUIClick",dalsza_praca,
function(liczba,thePlayer)
    if liczba == "left" then
        if source == dalej then
            xymarker_cel ()
            pojazdmarker createMarker xyz"checkpoint"52555110285localPlayer )
            blipcelu createBlipAttachedTo pojazdmarker41localPlayer )
            guiSetVisible(dalsza_praca,false)
            showCursor(false)
            elseif source == koniec then
            guiSetVisible(dalsza_praca,false)
            showCursor(false)
        end
    end
end)


addEvent("praca_dorywcza"true)
function createDestinations ()
    xymarker_cel ()
    pojazdmarker createMarker xyz"checkpoint"52555110285localPlayer )
    blipcelu createBlipAttachedTo pojazdmarker41localPlayer )
end
addEventHandler "praca_dorywcza"rootcreateDestinations )



Ostatnio zmieniony przez Marcinos651 2015-12-23, 23:09, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-23, 21:26


serek123

Lua, MySql, Sql






Wiek: 27
Na forum: 4334 dni
Posty: 217
Nick w MP: Serek.

Piwa: 374

Respekt: 70


createBlip( -1853.0203857422115.515487670914.117187552) -- miejsce pracy dorywczej "kopalnia"

local marker_zacznijprace createMarker ( -1853.0203857422115.515487670914.1171875"cylinder"32550085 ) -- marker w kt?rym zaczyna siprace

local cele = -- cele kopalnii
{
    { -1805.08,999.21,23.89 };
    { -2016.65,970.11,44.56 };
    { -1955.51,1188.48,44.45 };
    { -1617.51,1074.92,6.19 };
    { -1581.15,865.56,6.60 };
}


addEventHandler("onResourceStart",marker_zacznijprace,
function(panel) 
    if panel == gracz and not isPedInVehicle(graczthen 
        guiSetVisible(marker_zacznijprace,true) 
        showCursor(true) 
    end 
end)



function marker_cel ()
    return unpack cele math.random #cele ) ] )
end



                                                                           -- [[ Panel Pracy Dorywczej ]] --
                                                                           
----------------------------------------------------------------------------------------------------------------------------------------------------                                                                           
sx,sy guiGetScreenSize()
gracz getLocalPlayer()
pieniadze math.random(1,2)
----------------------------------------------------------------------------------------------------------------------------------------------------
praca_panel guiCreateWindow(541/1366*sx112/768*sy363/1366*sx416/768*sy,"Praca w Kopalni"false)
guiWindowSetSizable(praca_panelfalse)
guiSetAlpha(praca_panel0.70)
----------------------------------------------------------------------------------------------------------------------------------------------------
tekst guiCreateMemo(25/1366*sx115/768*sy314/1366*sx123/768*sy"     Praca G?rnik\n     Zarobki: 300-500$"falsepraca_panel)
----------------------------------------------------------------------------------------------------------------------------------------------------

label guiCreateLabel(15/1366*sx19/768*sy334/1366*sx46/768*sy"       Praca Dorywcza by Milo. Zakaz Usuwania Autora!"falsepraca_panel)
guiSetFont(label"default-bold-small")
----------------------------------------------------------------------------------------------------------------------------------------------------
zaczyna_prace guiCreateButton(52/1366*sx264/768*sy260/1366*sx57/768*sy"Zacznij Prac?"falsepraca_panel)
guiSetProperty(zaczyna_prace"NormalTextColour""FFAAAAAA")
----------------------------------------------------------------------------------------------------------------------------------------------------
skoncz_prace guiCreateButton(52/1366*sx337/768*sy260/1366*sx57/768*sy"Wy??cz Panel"falsepraca_panel)
guiSetProperty(skoncz_prace"NormalTextColour""FFAAAAAA")  
guiSetVisible (praca_panel,false)
guiMemoSetReadOnly(tekst,true)
guiWindowSetMovable (praca_panel,true )
guiWindowSetSizable (praca_panel,false )

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

dalsza_praca guiCreateWindow(522232353138""false)

----------------------------------------------------------------------------------------------------------------------------------------------------
tekstt guiCreateLabel(118/1366*sx24/768*sy246/1366*sx30/768*sy"Chcesz dalej pracowa??"falsedalsza_praca)

----------------------------------------------------------------------------------------------------------------------------------------------------
dalej guiCreateButton(206714444"TAK"falsedalsza_praca)

----------------------------------------------------------------------------------------------------------------------------------------------------
koniec guiCreateButton(1856714444"NIE"falsedalsza_praca)

----------------------------------------------------------------------------------------------------------------------------------------------------
guiWindowSetSizable(dalsza_pracafalse)
guiWindowSetMovable(dalsza_pracatrue)
guiSetVisible (dalsza_pracafalse)






addEventHandler("onClientGUIClick",praca_panel,
function(liczba,thePlayer)
    if liczba == "left" then
        if source == zaczyna_prace then
            outputChatBox ("((Teraz wejdz ponownie w marker aby wzi??? pojazd!))",225,225,225true)
            guiSetVisible(praca_panel,false)
            guiSetVisible(zaczyna_prace,false)
            showCursor(false)
            --
            wez_pojazd guiCreateButton(52/1366*sx264/768*sy260/1366*sx57/768*sy"We? Pojazd"falsepraca_panel)
            koncz guiCreateButton(52/1366*sx337/768*sy260/1366*sx57/768*sy"Wy??cz Panel"falsepraca_panel)
            guiSetAlpha(koncz0.0)
            --
            end
        end
    end
)

addEventHandler("onClientGUIClick",praca_panel,
function(liczba,thePlayer)
    if liczba == "left" then
        if source == skoncz_prace then
        guiSetVisible(praca_panel,false)
        showCursor(false)
    end
  end
end)

addEventHandler("onClientGUIClick",praca_panel,
function(liczba,thePlayer)
    if liczba == "left" then
        if source == koncz then
        guiSetVisible(praca_panel,false)
        guiSetVisible(koncz,false)
        guiSetVisible(wez_pojazd,false)
        guiSetVisible(offduty,false)
        guiSetVisible(skoncz_prace,true)
        guiSetVisible(zaczyna_prace,true)
        showCursor(false)
        destroyElement pojazdmarker )
        destroyElement blipcelu )
    end
  end
end)
    
addEventHandler("onClientGUIClick",praca_panel,
function(liczba,thePlayer)
    if liczba == "left" then
        if source == wez_pojazd then
        outputChatBox ("((Jeste? ju? w poje?dzie jed? do wyznaczonego celu))",thePlayer,225,225,225true)
        triggerServerEvent "praca_dorywcza"gracz)
        triggerServerEvent "dajepojazd"gracz)
        guiSetVisible(praca_panel,false)
        guiSetVisible(koncz,true)
        guiSetVisible(zaczyna_prace,false)
        guiSetVisible(wez_pojazd,false)
        guiSetVisible(skoncz_prace,true)
        showCursor(false)
        end
    end
end)


        
addEventHandler("onClientMarkerHit",marker_zacznijprace,
    function(panel)
        if panel == gracz and not isPedInVehicle(graczthen
            guiSetVisible(praca_panel,true)
            showCursor(true)
        end
    end
)


addEventHandler "onClientMarkerHit"root,
    function ( hitElement )
        if source == pojazdmarker and localPlayer == hitElement  then
        local pojazd getPedOccupiedVehicle localPlayer )
        if pojazd and getElementModel(pojazd) == 524 then -- pojazd 
            triggerServerEvent "dostaje_pieniadze"localPlayer )
            destroyElement pojazdmarker )
 
            if isElement(blipceluthen 
            destroyElement blipcelu ) -- usuwa blip celu 
end
 
            guiSetVisible(dalsza_praca,true)
            showCursor(true)
        end
    end
end)




addEventHandler("onClientGUIClick",dalsza_praca,
function(liczba,thePlayer)
    if liczba == "left" then
        if source == dalej then
            xymarker_cel ()
            pojazdmarker createMarker xyz"checkpoint"52555110285localPlayer )
            blipcelu createBlipAttachedTo pojazdmarker41 )
            guiSetVisible(dalsza_praca,false)
            showCursor(false)
            elseif source == koniec then
            guiSetVisible(dalsza_praca,false)
            showCursor(false)
        end
    end
end)


addEvent("praca_dorywcza"true)
function createDestinations ()
    xymarker_cel ()
    pojazdmarker createMarker xyz"checkpoint"52555110285localPlayer )
    blipcelu createBlipAttachedTo pojazdmarker41 )
end
addEventHandler "praca_dorywcza"rootcreateDestinations )

Zobacz tak

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-23, 23:08


Marcinos651







Wiek: 28
Na forum: 4480 dni
Posty: 18
Nick w MP: Marcin651



Respekt: 50

Dziala piwko polecialo ;)

Postaw piwo autorowi tego posta
 

 
Tagi: piwko!.blip :: przyjeciu :: zlecenia.
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