Songo23
Wiek: 23 Na forum: 3047 dni Posty: 37
Nick w MP: Songo23
Piwa : 665
Hejka!
Chcia?em aby marker porusza? si? razem z graczem (co? jak na newplace), ale zamiast tego, to marker porusza sie w d?? i w g?r?. Pomo?e kto??
SS: https://imgur.com/a/r01l5ZR
Linijka:
dxDrawMaterialLine3D ( x + size , y + size , z + 0.04 , x - size , y - size , z + 0.04 , light , size * 3 , tocolor ( r , g , b , 255 ), x )
Funkcja:
function()
for i , v in ipairs ( getElementsByType ( "marker" )) do
if getElementData ( v , "m:praca" ) then
local x , y , z = getElementPosition ( v )
local x2 , y2 , z2 = getElementPosition ( localPlayer )
local r , g , b , a = getMarkerColor ( v )
local distanceBetweenPoints = getDistanceBetweenPoints3D ( x , y , z , x2 , y2 , z2 )
if ( distanceBetweenPoints < distance ) then
local size = getMarkerSize ( v )
if anim_type == "foward" then
local progress = ( getTickCount () - animTime ) / 2500
position = math . floor ( interpolateBetween ( 0 , 0 , 0 , 200 , 0 , 0 , progress , "SineCurve" ))
if( progress > 1 ) then
anim_type = "foward"
animTime = getTickCount ()
end
end
dxDrawMaterialLine3D ( x , y , z + 1 + 1 +( position / 1000 ), x , y , z + 1 +( position / 1000 ), arrow , 1 , tocolor ( r , g , b , 200 ))
dxDrawMaterialLine3D ( x + size , y + size , z + 0.04 , x - size , y - size , z + 0.04 , light , size * 3 , tocolor ( r , g , b , 255 ), x )