Wysłany: 2018-09-23, 11:59
czlowiekjaja
Wiek: 20 Na forum: 2850 dni Posty: 76
Nick w MP: czlowiekjaja
Piwa : 324
Witam mam tutaj taki kod ale co? nie dzia?a prosi?bym o pomoc.
Kod:
addEventHandler ( "onClientMarkerHit" , getRootElement (),
function( plr )
if source == rozpocznij then else return end
if getElementType ( plr ) == "player" then else return end
if isElementWithinMarker ( plr , rozpocznij ) then else return end
pojazd = getPedOccupiedVehicle ( plr )
if pojazd then return end
local now = getTickCount ()
local endTime = start + 10000
local elapsedTime = now - start
local duration = endTime - start
local progress = elapsedTime / duration
a1 = interpolateBetween ( 0 , 0 , 0 , 255 , 0 , 0 , progress , "Linear" )
guiSetAlpha ( window1 , a1 )
Wysłany: 2018-09-23, 12:16
nanKy
Wiek: 22 Na forum: 3866 dni Posty: 498
Nick w MP: nanky
Piwa : 1773
"Indeed it makes more sense to use it with onClientRender/onClientPreRender but the freedom is given to use it in any other context."
U?yj interpolacji w evencie onClientRender.
Czyli...
addEventHandler ( "onClientMarkerHit" , getRootElement (),
function( plr )
if source == rozpocznij then else return end
if getElementType ( plr ) == "player" then else return end
if isElementWithinMarker ( plr , rozpocznij ) then else return end
pojazd = getPedOccupiedVehicle ( plr )
if pojazd then return end
addEventHandler ( 'onClientRender' , root , animation )
end )
function animation ()
local now = getTickCount ()
local endTime = start + 10000
local elapsedTime = now - start
local duration = endTime - start
local progress = elapsedTime / duration
a1 = interpolateBetween ( 0 , 0 , 0 , 255 , 0 , 0 , progress , "Linear" )
guiSetAlpha ( window1 , a1 )
end
Tagi: animacja :: alphy
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: