Bomber help
#1

Hello.

I'm making bomber system, all work good but when i press bomb 3-4 times 1 bomb explode, on other i just see objects. Didn't explode..

Код:
new Rocket[ MAX_PLAYERS ]; // The Rocket
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{

    if( newkeys == KEY_YES )
	{
		new Float:x, Float:y, Float:z, vehicleid, Float:Angle;
		GetPlayerPos( playerid, x, y, z );
        vehicleid = GetPlayerVehicleID(playerid);
        GetVehicleZAngle(vehicleid, Angle);
        Rocket[playerid] = CreateObject(354, x, y, z-3.0, 0, 0, Angle+90);
		z = 0.0;
		GetPointZPos( x, y, z );
		MoveObject(Rocket[playerid], x, y, z, 32.0 );

	}

	return 1;
}
Код:
public OnObjectMoved(objectid)
{
		new playerid;
		new Float:x, Float:y, Float:z;
		GetObjectPos( Rocket[playerid], x, y, z );
		CreateExplosion( x, y, z, 4, 40 );
		DestroyObject( Rocket[playerid] );
	return 1;
}
Reply


Messages In This Thread
Bomber help - by shulk - 12.08.2014, 22:10
Respuesta: Bomber help - by Su37Erich - 12.08.2014, 22:20
Re: Bomber help - by shulk - 13.08.2014, 10:35
Re: Bomber help - by GGW - 13.08.2014, 10:42
Re: Bomber help - by shulk - 13.08.2014, 11:43
Re: Bomber help - by shulk - 15.08.2014, 15:06
Respuesta: Re: Bomber help - by Su37Erich - 15.08.2014, 23:17

Forum Jump:


Users browsing this thread: 1 Guest(s)