[FilterScript] SIMPLE EXPLOSIONS
#1

hey,
I created a small system - simple explosions. How do they work? Is simple - if you step on a bomb set up, you will explode. it took a few minutes DD

DOWNLOAD:
Код:
// ========================================================================== //
/*

							SIMPLE EXPLOSIONS

*/
// ========================================================================== //

#include < a_samp >

new Float:bombPlants[3][3] =
{
	{ 145.2020,-71.7623,1.4297 },
	{ 137.1216,-73.8636,1.4297 },
	{ 132.7672,-88.3605,1.4297 }
};

public OnPlayerUpdate( playerid )
{
	IsPlayerInBombPlant( playerid );
	return 1;
}

stock IsPlayerInBombPlant( playerid )
{
	for ( new i = 0; i < 3; i++ )
	{
		if ( IsPlayerInRangeOfPoint(playerid,2.0,bombPlants [ i ] [ 0 ],bombPlants [ i ] [ 1 ],bombPlants [ i ]  [ 2 ] ))
		{
			new Float:pos[ 3 ];
			GetPlayerPos( playerid, pos[ 0 ], pos[ 1 ], pos[ 2 ] );
			CreateExplosion(pos[ 0 ], pos[ 1 ], pos[ 2 ], 2, 1 );
			print( "successful explosion" );
		}
	}
}
Reply
#2

Easy but good idea.
Reply
#3

you also need to create a object at the explosion cordinates such as a mine.. or just a bomb
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)