pawn Код:
COMMAND:explode(playerid, params[])
{
new
Player,
Radius[11],
Float:TheirPos[3];
if(sscanf(params, "uS(Medium)[11]", Player, Radius)) {
SendClientMessage(playerid, c_white, "[USAGE] /Explode [Player ID] [Radius (Optional - Very Small, Small, Medium, Large)]");
SendClientMessage(playerid, c_orange, "[FUNCTION] Creates an explosion on the player. Can be used to check for health hacks.");
return 1;
}
GetPlayerPos(Player, TheirPos[0], TheirPos[1], TheirPos[2]);
if(strcmp(Radius, "Very Small", true) == 0) {
CreateExplosion(TheirPos[0], TheirPos[1], TheirPos[2], 12, 5);
}
else if(strcmp(Radius, "Small", true) == 0) {
CreateExplosion(TheirPos[0], TheirPos[1], TheirPos[2], 11, 5);
}
else if(strcmp(Radius, "Medium", true) == 0) {
CreateExplosion(TheirPos[0], TheirPos[1], TheirPos[2], 1, 5);
}
else if(strcmp(Radius, "Large", true) == 0) {
CreateExplosion(TheirPos[0], TheirPos[1], TheirPos[2], 10, 5);
}
else return SendClientMessage(playerid, c_red, "Invalid Parameter! (Radius)");
printf("[EXPLODE] Administrator %s has exploded %s. [Type: %s]", pName(playerid), pName(Player), Radius);
return 1;
}
Straight out of my admin filterscript, so please, if you do end up using it, keep the credits by the side of the command.