RO Power Hosting Forum

Gaming Area => Multiplayer => GTA San Andreas => Scripting => Topic started by: [RSS]CypS on Dec 23, 2010, 07:07 PM

Title: Moving object
Post by: [RSS]CypS on Dec 23, 2010, 07:07 PM
Salut, aj avea si yo o problema.
Cum as putea sa fak ca sa se miste un obiect in continuu, fara sa se opreasca? :-?
Title: Re: Moving object
Post by: ![]stuntman[]! on Dec 23, 2010, 07:11 PM
GetObjectPos (http://wiki.sa-mp.com/wiki/GetObjectPos)
SetObjectPos (http://wiki.sa-mp.com/wiki/SetObjectPos)


new Float:x,Float:y,Float:z;
GetObjectPos(id_obiect,x,y,z);
if(x == coord.x && y == coord.y && z == coord.z) SetObjectPos(id_obiect,newx,newy,newz);

asta intr-un timer care porneste la OnGameModeInit.

Ar trebui sa mearga ;)), nu-s sigur daca am facut bine la if(.... :D
Title: Re: Moving object
Post by: [RSS]CypS on Dec 23, 2010, 07:13 PM
thanks stuntman ;)
LOCKED