Wysłany: 2018-11-24, 10:54
MartinPanZycia
Zielony w LUA
Wiek: 27 Na forum: 3728 dni Posty: 476
Nick w MP: Rodzaje
Piwa : 878
Wszystko dzia?a na pocz?tku tylko paczki nie mo?na odda? do drugiego markera
addEventHandler("onClientMarkerHit", markerx, function(el, md)
function startjob2 ()
if source ~= buttonstart2 then return end
if getElementData ( localPlayer , "mamskrzynke" ) == true
then outputChatBox ( "Masz ju? skrzynke!" ) return end
losuj = math . random ( 1 , #markery )
local markerx = createMarker ( markery [ losuj ][ 1 ], markery [ losuj ][ 2 ], markery [ losuj ][ 3 ], markery [ losuj ][ 4 ], markery [ losuj ][ 5 ], markery [ losuj ][ 6 ], markery [ losuj ][ 7 ], markery [ losuj ][ 8 ], markery [ losuj ][ 9 ])
blip = createBlipAttachedTo ( markerx , 41 )
setElementData ( localPlayer , "mamskrzynke" , true )
box = createObject ( 2912 , 0 , 0 , 0 )
attachElements ( box , localPlayer , 0 , 0.78 , 0.3 )
toggleControl ( "sprint" , false )
toggleControl ( "jump" , false )
toggleControl ( "fire" , false )
end
setPedAnimation ( localPlayer , "carry" , "crry_prtial" , 1 , false , true )
addEventHandler ( "onClientMarkerHit" , markerx , function( el , md )
if localPlayer == el and md then
setPedAnimation ( localPlayer , "CARRY" , "putdwn" , - 1 , true , false , false )
setTimer (function()
setElementData ( localPlayer , "wezpaczke" , false )
setElementData ( localPlayer , "mamskrzynke" , false )
destroyElement ( markerx )
destroyElement ( blip )
destroyElement ( box )
toggleControl ( "sprint" , true )
toggleControl ( "jump" , true )
toggleControl ( "fire" , true )
triggerServerEvent ( "hajs:paczka" , localPlayer )
setPedAnimation ( localPlayer )
end , 1000 , 1 )
end
end )
Podpis
Cześć w MTA jestem jako Rodzaje.
Wszystko jest po staremu nie zamierzam stawiać RPG.
Wysłany: 2018-11-24, 11:09
Query
SyndicateMTA
Wiek: 24 Na forum: 3071 dni Posty: 319
Nick w MP: Query
Piwa : 5257
Wysłany: 2018-11-24, 11:14
Avenged
Młodszy Szkrypter
Wiek: 23 Na forum: 3510 dni Posty: 654
Nick w MP: Avenged
Piwa : 1570
Zmienn? markerx zmie? na globaln?
Podpis
LUA, JS, PHP
Zapraszam do skorzystania z moich usług: Klik
Wysłany: 2018-11-24, 11:30
MartinPanZycia
Zielony w LUA
Wiek: 27 Na forum: 3728 dni Posty: 476
Nick w MP: Rodzaje
Piwa : 878
"BarteQ03" napisał/a :Zmienn? markerx zmie? na globaln?
czyli mam zmieni? tylko nazw? zmiennej ?
Podpis
Cześć w MTA jestem jako Rodzaje.
Wszystko jest po staremu nie zamierzam stawiać RPG.
Wysłany: 2018-11-24, 11:31
Avenged
Młodszy Szkrypter
Wiek: 23 Na forum: 3510 dni Posty: 654
Nick w MP: Avenged
Piwa : 1570
usu? local poprostu
Podpis
LUA, JS, PHP
Zapraszam do skorzystania z moich usług: Klik
Wysłany: 2018-11-25, 15:13
MartinPanZycia
Zielony w LUA
Wiek: 27 Na forum: 3728 dni Posty: 476
Nick w MP: Rodzaje
Piwa : 878
nadal to samo
Podpis
Cześć w MTA jestem jako Rodzaje.
Wszystko jest po staremu nie zamierzam stawiać RPG.
Wysłany: 2018-11-25, 15:33
Wilq
Wiek: 24 Na forum: 4428 dni Posty: 3410
Piwa : 739
Ustawiasz animacj? poza funkcj? wykonuj?c?.
Musisz doda? event we funkcji startjob2, chyba taki przynajmniej mia?e? zamiar.
Spr?buj poni?szy kod.
function startjob2 ()
if source ~= buttonstart2 then return end
if getElementData ( localPlayer , "mamskrzynke" ) == true then outputChatBox ( "Masz ju? skrzynke!" ) return end
losuj = math . random ( 1 , #markery )
markerx = createMarker ( markery [ losuj ][ 1 ], markery [ losuj ][ 2 ], markery [ losuj ][ 3 ], markery [ losuj ][ 4 ], markery [ losuj ][ 5 ], markery [ losuj ][ 6 ], markery [ losuj ][ 7 ], markery [ losuj ][ 8 ], markery [ losuj ][ 9 ])
blip = createBlipAttachedTo ( markerx , 41 )
setElementData ( localPlayer , "mamskrzynke" , true )
box = createObject ( 2912 , 0 , 0 , 0 )
attachElements ( box , localPlayer , 0 , 0.78 , 0.3 )
toggleControl ( "sprint" , false )
toggleControl ( "jump" , false )
toggleControl ( "fire" , false )
setPedAnimation ( localPlayer , "carry" , "crry_prtial" , 1 , false , true )
addEventHandler ( "onClientMarkerHit" , markerx , function( el , md )
if localPlayer == el and md then
setPedAnimation ( localPlayer , "CARRY" , "putdwn" , - 1 , true , false , false )
setTimer (function()
setElementData ( localPlayer , "wezpaczke" , false )
setElementData ( localPlayer , "mamskrzynke" , false )
destroyElement ( markerx )
destroyElement ( blip )
destroyElement ( box )
toggleControl ( "sprint" , true )
toggleControl ( "jump" , true )
toggleControl ( "fire" , true )
triggerServerEvent ( "hajs:paczka" , localPlayer )
setPedAnimation ( localPlayer )
end , 1000 , 1 )
end
end )
end
Więcej szczegółów
Wystawiono 1 piw(a):MartinPanZycia
Wysłany: 2018-11-26, 14:25
MartinPanZycia
Zielony w LUA
Wiek: 27 Na forum: 3728 dni Posty: 476
Nick w MP: Rodzaje
Piwa : 878
Dzi?ki pomog?o , w zamian piwo + respekt
Podpis
Cześć w MTA jestem jako Rodzaje.
Wszystko jest po staremu nie zamierzam stawiać RPG.
Tagi: addeventhandler :: [expected :: element :: argument :: got :: nil]
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: