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

Wysłany: 2015-11-09, 14:03


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4470 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Witam was. Juz pisalem to wczesniej ale nikt nie pomogl. Chodzi mi aby markery i blipy byly robione dla jednej osoby
server :

marker =  createMarker (-208.78,1221.14,19.0,"cylinder",1.0,0,200,0,255)
ped = createPed (16,-208.82,1220.29,19.89)

function zresp ( player )
local auto = createVehicle (552,-194.61,1224.06,19.43,359.1,0.0,180.2)
setElementData ( auto, "pojazd_paliwo", 50 )
setElementData ( auto, "pojazd_opis", "Praca dorywcza - ?atanie dziur " )
warpPedIntoVehicle ( player , auto, 0  )
outputChatBox  (" ",player,0,200,0)
outputChatBox  ("Praca dorywcza - ?atanie dziur ",player,0,200,0)
outputChatBox  (" ",player,0,200,0)
end
addEventHandler ("onMarkerHit",marker,zresp) 

local punkty = {
{-171.24487304688, 1096.1301269531, 19.606197357178},
{30.913167953491, 1119.8073730469, 19.623331069946},
{-91.321762084961, 1200.033203125, 19.619775772095},
{-112.26300811768, 1169.1364746094, 19.603679656982},
{-187.25840759277, 1025.6124267578, 19.60319519043},
{-218.66180419922, 1003.6341552734, 19.698823928833},
{-294.93395996094, 1064.3399658203, 19.611391067505},
{-343.91772460938, 1122.2767333984, 19.606252670288},
{-340.33258056641, 1167.6424560547, 19.738605499268},
}

        function markery (player)
        local pkt = punkty[math.random(1, #punkty)] 
         marker = createMarker(pkt[1], pkt[2], pkt[3], "checkpoint",2.0, 123, 225, 56, 150,player) 
         blip = createBlipAttachedTo(marker, 11,2,255,0,0,255,0,) 
        end
        addEventHandler("onMarkerHit",marker, markery)

                function destroyauto ( player )
                if ( getElementModel ( player ) == 552 ) then
                destroyElement (auto)
                end
                end
                addEventHandler ( "onVehicleExit", destroyauto )


local money = math.random(5,15)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-09, 14:36


Tostuch







Wiek: 28
Na forum: 5072 dni
Posty: 483
Nick w MP: Tost

Piwa: 137

Respekt: 110
Respekt: 110

ostatni parametr w kazdej z tych funkcji odpowiada widocznosci

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-09, 14:37


Artysta

Lua, Lua, Czekolada






Wiek: 28
Na forum: 4607 dni
Posty: 240
Nick w MP: Artysta/Koojot

Piwa: 1427

Respekt: 205,8
Respekt: 205,8Respekt: 205,8

Najlepiej zr?b przekierowanie na stron? clienta i tam tw?rz markery.

Podpis
Something is coming..
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-09, 15:09


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4470 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Cos takiego ?

client:

function pokazmarker (player)
    local pkt = punkty[math.random(1, #punkty)] 
         marker = createMarker(pkt[1], pkt[2], pkt[3], "checkpoint",2.0, 123, 225, 56, 150) 
           blip = createBlipAttachedTo(marker, 11)
end
addEvent( "pokazmarker", true )
addEventHandler( "pokazmarker", player, pokazmarker )


server
marker =  createMarker (-2477.33,740.23,34.0,"cylinder",3.0,0,255,255,255)

function zresp ( player )
local auto = createVehicle (552,-2473.05,740.76,34.73,359.7,360.0,179.4)
setElementData ( auto, "pojazd_paliwo", 50 )
setElementData ( auto, "pojazd_opis", "Praca dorywcza - ?atanie dziur " )
warpPedIntoVehicle ( player , auto, 0  )
outputChatBox  (" ",player,0,200,0)
outputChatBox  ("Praca dorywcza - ?atanie dziur ",player,0,200,0)
outputChatBox  (" ",player,0,200,0)
end
addEventHandler ("onMarkerHit",marker,zresp) 

local punkty = {
{-171.24487304688, 1096.1301269531, 19.606197357178},
{30.913167953491, 1119.8073730469, 19.623331069946},
{-91.321762084961, 1200.033203125, 19.619775772095},
{-112.26300811768, 1169.1364746094, 19.603679656982},  
{-187.25840759277, 1025.6124267578, 19.60319519043},
{-218.66180419922, 1003.6341552734, 19.698823928833},
{-294.93395996094, 1064.3399658203, 19.611391067505},
{-343.91772460938, 1122.2767333984, 19.606252670288},
{-340.33258056641, 1167.6424560547, 19.738605499268},
}

        function markery (player)
            triggerClientEvent ( player, "pokazmarker", player )
        end
        addEventHandler("onMarkerHit",marker, markery)

                function destroyauto ( player )
                if ( getElementModel ( player ) == 552 ) then
                destroyElement (auto)
                end
                end
                addEventHandler ( "onVehicleStartExit", destroyauto )


local money = math.random(5,15)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-09, 15:14


jg2aviva1

Rusek :D






Wiek: 25
Na forum: 4275 dni
Posty: 446
Nick w MP: _Wolfenstei[N]^.^

Piwa: 1034

Respekt: 240
Respekt: 240Respekt: 240

Ostrzeżeń: 60%
po co triggery? to co ci poda? Tostuch wykorzystaj. ?atwiejsze jest dodanie parametru na ko?cu funkcji, dla kogo ma by? widoczny. Tu masz opisane:


Więcej informacji znajdziesz w Wikipedii MTA:

createMarker


Podpis



GTAO Member: 2015-08-23, 14:26

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-09, 15:34


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4470 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

"jg2aviva1" napisał/a:

po co triggery? to co ci poda? Tostuch wykorzystaj. ?atwiejsze jest dodanie parametru na ko?cu funkcji, dla kogo ma by? widoczny. Tu masz opisane:


Więcej informacji znajdziesz w Wikipedii MTA:

createMarker


Mam juz z markerem ale z blipem ?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-09, 15:38


jg2aviva1

Rusek :D






Wiek: 25
Na forum: 4275 dni
Posty: 446
Nick w MP: _Wolfenstei[N]^.^

Piwa: 1034

Respekt: 240
Respekt: 240Respekt: 240

Ostrzeżeń: 60%
z tego co wiem to z blipem jest tak samo, zobacz:


Więcej informacji znajdziesz w Wikipedii MTA:

createBlip


Podpis



GTAO Member: 2015-08-23, 14:26

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-09, 15:59


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4470 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Dzieki dziala macie po piffko

[ Dodano: 2015-11-09, 16:11 ]
A teraz mam taki problem :

marker =  createMarker (-2477.85,741.61,34.0,"cylinder",3.0,0,255,255,255)

function zresp ( player )
local auto = createVehicle (552,-2473.05,740.76,34.73,359.7,360.0,179.4)
setElementData ( auto, "pojazd_paliwo", 50 )
setElementData ( auto, "pojazd_opis", "Praca dorywcza - ?atanie dziur " )
warpPedIntoVehicle ( player , auto, 0  )
outputChatBox  (" ",player,0,200,0)
outputChatBox  ("Praca dorywcza - ?atanie dziur ",player,0,200,0)
outputChatBox  (" ",player,0,200,0)
end
addEventHandler ("onMarkerHit",marker,zresp) 

local punkty = {
{-2337.45,725.73,43.49},
{-2149.48,654.08,51.84},
{-1999.69,514.99,34.59},
{-1893.74,800.24,37.61},  
{-1789.41,978.51,24.32},
{-1776.95,1267.21,10.43},
{-2169.30,1277.51,27.65},
{-2269.48,1066.80,81.08},
{-2255.72,340.48,33.47},
}

        function markery (player)
            local pkt = punkty[math.random(1, #punkty)] 
         marker = createMarker(pkt[1], pkt[2], pkt[3], "checkpoint",2.0, 123, 225, 56, 150,player) 
           blip = createBlipAttachedTo(marker, 11,2,255,0,0,255,0,9999999999,player)
        end
        addEventHandler("onMarkerHit",marker, markery)

                function destroyauto ( player, auto )
                if ( getElementModel ( player ) == 552 )  then
                destroyElement (auto, player)
                end
                end
                addEventHandler ( "onVehicleExit", destroyauto )
                
                function  next (player)
                destroyElement(marker, player)
                destroyElement(blip, player)
                givePlayerMoney(money, player)
                end
                addEventHandler("onMarkerHit",marker,next)
                
local money = math.random(5,15)

Nie respia sie wgl markery

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-09, 16:36


Tostuch







Wiek: 28
Na forum: 5072 dni
Posty: 483
Nick w MP: Tost

Piwa: 137

Respekt: 110
Respekt: 110

Jakie? b??dy w db3?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-11-09, 16:38


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4470 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157

Niestety nie. A i jeszcze jeden problem z niszczeniem auta jak ktos wysiadzie tez nie ma db

[ Dodano: 2015-11-09, 19:01 ]
To jak ma ktos jakis pomysl ?

Postaw piwo autorowi tego posta
 

 
Tagi: praca :: dorywcza.
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 dorywcza. 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