Wysłany: 2017-04-09, 10:25
Atroth
Wiek: 23 Na forum: 3677 dni Posty: 1089
Nick w MP: Atroth
Piwa : 4808
Witam. Chc? zrobi? prac? na tartak. Gdy wchodz? w marker nie daje animacji i broni
markerpraca = createMarker ( 2476.36499 , - 1672.54089 , 13.33745 - 1 , "cylinder" , 1.5 , 255 , 255 , 255 , 170 ) -- marker rozpoczynaj ? cy prac ?
drzewa = {
{ 2479.64355 , - 1665.89270 , 13.33346 },
{ 2467.90430 , - 1661.35620 , 13.30115 }
}
function drzewastworz ()
for k , v in ipairs ( drzewa ) do
createObject ( 615 , v [ 1 ], v [ 2 ], v [ 3 ] - 1 , 0 , 0 , 0 )
for k , v in ipairs ( drzewa ) do
createMarker ( v [ 1 ], v [ 2 ], v [ 3 ] - 1 , "cylinder" , 3 , 255 , 255 , 255 , 170 )
end
end
end
addEventHandler ( "onResourceStart" , root , drzewastworz )
function bron ()
if ( markerpraca ) then
giveWeapon ( source , 9 , 1 )
end
end
addEventHandler ( "onMarkerHit" , root , bron )
function animacja ()
if ( drzewa ) then
setTimer (function()
setPedAnimation ( source , "CHAINSAW" , "WEAPON_csaw" )
end , 3000 , 1 )
end
end
addEventHandler ( "onMarkerHit" , root , animacja )
Podpis
Użytkownik - 10-05-2016
Support Team - 17.06.2017
Moderator - 25.11.2017
Mod-Team - 02.07.2018
Wysłany: 2017-04-09, 14:26
Barcioo
Kiedyś to było ST
Wiek: 26 Na forum: 4048 dni Posty: 458
Nick w MP: Bartek.
Piwa : 1887
Rookspack , jakie? db3 wyst?puje
Podpis
Kanał Youtube;
A tu zapraszam
[you]
, pomogłem Ci? Wynagrodź mnie
SUPPORT TEAM - 2016-09-03 do 2018-05-25
Test Mod - 2018-05-25
1k dni na Forum - 2018-01-28
GG: 62111935
Wysłany: 2017-04-09, 14:36
Atroth
Wiek: 23 Na forum: 3677 dni Posty: 1089
Nick w MP: Atroth
Piwa : 4808
Barcioo , Nie.
Podpis
Użytkownik - 10-05-2016
Support Team - 17.06.2017
Moderator - 25.11.2017
Mod-Team - 02.07.2018
Wysłany: 2017-04-09, 17:25
amited
Wiek: 26 Na forum: 3714 dni Posty: 1233
Nick w MP: Amited
Piwa : 512
A argumenty dla funkcji gdzie s?? Przeczytaj uwa?nie ten event.
Więcej informacji znajdziesz w Wikipedii MTA: OnMarkerHit
Podpis
"amited" napisał/a :
Wysłany: 2017-04-09, 21:05
saller123
Dopiero się ucze ;)
Wiek: 25 Na forum: 4679 dni Posty: 95
Nick w MP: Davitek
Piwa : 212
function bron ()
giveWeapon ( source , 9 , 1 )
end
addEventHandler ( "onMarkerHit" , markerpraca , bron )
Wysłany: 2017-04-10, 14:01
amited
Wiek: 26 Na forum: 3714 dni Posty: 1233
Nick w MP: Amited
Piwa : 512
saller123 , M?wi? o argumentach... dla twojej wiadomo?ci 'source' w evnecie 'onMarketHit' to nie jest gracz tylko marker w kt?ry gracz wejdzie...
function bron ( el , md )
if not getPedOccupiedVehicle ( el ) then
giveWeapon ( el , 9 , 1 )
end
end
addEventHandler ( "onMarkerHit" , markerpraca , bron )
Wysłany: 2017-04-10, 21:39
Atroth
Wiek: 23 Na forum: 3677 dni Posty: 1089
Nick w MP: Atroth
Piwa : 4808
Inny skryptwygl?da tak. (Nie chce tworzy? nowego tematu). Nie usuwa paczki.
local wez = createMarker ( 2491.28809 , - 1670.03906 , 13.33595 - 1 , "cylinder" , 2.5 , 255 , 255 , 0 , 170 )
local usun = createMarker ( 2500.28809 , - 1685.03906 , 13.33595 - 1 , "cylinder" , 2.5 , 255 , 255 , 0 , 170 )
function animacja ( thePlayer , paczka )
setPedAnimation ( thePlayer , "CARRY" , "crry_prtial" , 1 , true )
x , y , z = getElementPosition ( source )
paczka = createObject ( 1220 , x , y , z , 0 , 0 , 0 )
attachElements ( paczka , thePlayer , 0 , 0.8 , 0.6 )
setElementCollisionsEnabled ( paczka , false )
setElementData ( thePlayer , "m" , true )
end
addEventHandler ( "onMarkerHit" , wez , animacja )
function usunpaczke ( thePlayer )
setElementFrozen ( thePlayer , true )
setTimer ( function()
destroyElement ( paczka )
givePlayerMoney ( thePlayer , 100 )
setElementFrozen ( thePlayer , false )
setPedAnimation ( thePlayer , false )
end , 300 , 1 )
end
addEventHandler ( "onMarkerHit" , usun , usunpaczke )
Podpis
Użytkownik - 10-05-2016
Support Team - 17.06.2017
Moderator - 25.11.2017
Mod-Team - 02.07.2018
Ostatnio zmieniony przez Atroth 2017-04-10, 22:29, w całości zmieniany 1 raz
Wysłany: 2017-04-10, 22:19
marcin778
Krytyk serwerów MTA
Wiek: 24 Na forum: 4149 dni Posty: 2268
Nick w MP: Marcineg
Piwa : 4662
Ehh....
function animacja ( thePlayer , paczka )
setPedAnimation ( thePlayer , "CARRY" , "crry_prtial" , 1 , true )
x , y , z = getElementPosition ( thePlayer ) -- sk ? d ten source ??????????????
paczka = createObject ( 1220 , x , y , z , 0 , 0 , 0 )
attachElements ( paczka , thePlayer , 0 , 0.8 , 0.6 )
setElementCollisionsEnabled ( paczka , false )
setElementData ( thePlayer , "m" , true )
end
addEventHandler ( "onMarkerHit" , wez , animacja )
function usunpaczke ( thePlayer )
setElementFrozen ( thePlayer , true )
setTimer ( function( thePlayer )
destroyElement ( paczka )
givePlayerMoney ( thePlayer , 100 )
setElementFrozen ( thePlayer , false )
setPedAnimation ( thePlayer , false )
end , 300 , 1 , thePlayer )
end
addEventHandler ( "onMarkerHit" , usun , usunpaczke )
Wysłany: 2017-04-10, 22:27
Atroth
Wiek: 23 Na forum: 3677 dni Posty: 1089
Nick w MP: Atroth
Piwa : 4808
marcin778 ,
"Bad argument @ 'destroyElement' [excepted element at 1 argument, got nil"
Podpis
Użytkownik - 10-05-2016
Support Team - 17.06.2017
Moderator - 25.11.2017
Mod-Team - 02.07.2018
Tagi: nie :: daje :: animacji :: broni
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: