Object movement
#1

This code works, but moves my object not regularly. How to fix that?


Код:
#include <a_samp>
#define COLOR_LIGHTBLUE 0x33CCFFAA

new Scud;
new SkudSmoke;
new ProgressTimer;
new Float:x,Float:y,Float:z;

forward Misile(playerid);
forward ScudLaunch(playerid);
forward ScudProgres(playerid);


public OnFilterScriptInit()
{
SetTimer("Misile",30000,0);

return 1;
}

public OnPlayerSpawn(playerid)
{
	return 1;
}


public Misile(playerid)
{
Scud=CreateObject(17050,-1648.990,281.410,6.170,0.0,0.0,-339.434);
SkudSmoke=CreateObject(2780,-1649.058,281.403,5.425,0.0,0.0,0.0);
SetTimer("ScudLaunch",10000,0);
return 0;
}


public ScudLaunch(playerid)
{
MoveObject(Scud,-1648.990,281.410,170.000,15);
DestroyObject(SkudSmoke);
ProgressTimer=SetTimer("ScudProgres",200,1);
}


public ScudProgres(playerid)
{
GetObjectPos(Scud,x,y,z);
CreateExplosion(x,y,z,3,3);
{
if(z>=160.000)
{
KillTimer(ProgressTimer);
DestroyObject(Scud);
SetTimer("Misile",30000,0);
}
return 0;
}
}
Reply


Messages In This Thread
Object movement - by Liustas - 21.06.2010, 13:06
Re: Object movement - by c-middia - 21.06.2010, 17:03
Re: Object movement - by Liustas - 21.06.2010, 17:25
Re: Object movement - by Brian_G - 21.06.2010, 18:23
Re: Object movement - by Liustas - 21.06.2010, 19:39
Re: Object movement - by Brian_G - 21.06.2010, 19:46
Re: Object movement - by Liustas - 21.06.2010, 21:43
Re: Object movement - by Liustas - 23.06.2010, 21:41

Forum Jump:


Users browsing this thread: 1 Guest(s)