Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: burza
1. Burza, animacja, marker
Witam. Mam ma?y problem. Ot?? mam kod:


function burzaJeden ()
local strazacy = getPlayersInTeam ( getTeamFromName( "Ochotnicza Stra? Po?arna" ) )
createObject (846, 1098.60974, -2341.67236, 11.70432)
setWeather (8)
marker1 = createMarker (1100.40527, -2343.48730, 11.22701, "cylinder", 1, 255, 128, 128)
setElementVisibleTo ( marker1, getRootElement ( ), false )
for 
k,v in ipairs(strazacy)do
setElementVisibleTo(marker1, v, true) 
end
setTimer 
( function() 
setWeather (10)
end, 150000, 1 )
end
addCommandHandler
("burza1", burzaJeden)

function 
scinkaJedynkaJeden (thePlayer)
setPedAnimation ( thePlayer, "CHAINSAW", "WEAPON_csaw",-1,true, false, true, false)
setTimer( function ()
setPedAnimation ( getLocalPlayer(), false)
end, 6000, 1)
end
addEventHandler
("onMarkerHit", marker1, scinkaJedynkaJeden)


I teraz potrzebuj? zrobi? tak, aby druga funkcja jako? pobiera?a ten marker z funkcji jeden. Dlaczego zapytacie...Poniewa? jak dam u g?ry

marker1 
= createMarker (.....)

To wtedy ten marker pojawi si? razem wraz ze startem skryptu. A ja potrzebuj? zrobi? tak, aby marker pojawia? si? po wpisaniu komendy, a potem, ?e po wej?ciu w niego odpala si? animacja i stopuje po 6sec.