Quote:
Originally Posted by Calg00ne
There are some types of hacks that can circumvent explosions, but for the most part I suppose /explode would work, since most people haven't figured it out yet.
However, the command itself is pretty simple to create, simply use the CreateExplosion function to get it to work.
With zcmd/sscanf, this should work (untested):
pawn Код:
CMD:explode(playerid, params[]) { new iTarget; if(sscanf(params, "u", iTarget)) return 1; // The player didn't type a name or an ID if(iTarget == INVALID_PLAYER_ID) return 1; // Not connected.
if(!IsPlayerAdmin(playerid)) return 1; // The person typing this is not an admin.
new Float: fExplosionPosition[3]; // Create some variables so we can store the position of where the explosion will be
GetPlayerPos(iTarget, fExplosionPosition[0], fExplosionPosition[1], fExplosionPosition[2]); // Get the position that we'll set the explosion for CreateExplosion(fExplosionPosition[0], fExplosionPosition[1], fExplosionPosition[2], 2, 10.0); // Create the explosion with the SA-MP CreateExplosion function return 1; }
EDIT: Damn, beaten x2.
|
Not so much, you explained it better - Not to mention, I like your way of getting positions better; never knew you could do that. Thank you, I shall be using that from now on!