SA-MP Forums Archive
[FilterScript] SIMPLE EXPLOSIONS - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] SIMPLE EXPLOSIONS (/showthread.php?tid=427168)



SIMPLE EXPLOSIONS - organe. - 31.03.2013

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" );
		}
	}
}



Re: SIMPLE EXPLOSIONS - Private200 - 31.03.2013

Easy but good idea.


Re: SIMPLE EXPLOSIONS - FalconeX - 31.03.2013

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