CreateExplosion...Im Command siehst so aus:
if(strcmp(cmd, "/nuke", true) == 0) // Nuke a player (explode)
{
if (AccountInfo[playerid][AdminLevel] >= 3)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, ORANGE, "USAGE: /nuke [playerid]");
SendClientMessage(playerid, ORANGE, "FUNCTION: Player will explode.");
return 1;
}
new Float:X,Float:Y,Float:Z;
new giveplayerid = ReturnUser(tmp, playerid);
if(IsPlayerConnected(giveplayerid))
{
GetPlayerName(giveplayerid, giveplayername, sizeof(giveplayername));
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerPos(giveplayerid, X,Y,Z);
CreateExplosion(X,Y,Z,2,3.0);
SetPlayerHealth(giveplayerid, 0.0);
format(string, sizeof(string), "-| Administrator %s nuked %s |-",sendername,giveplayername);
SendClientMessageToAdmins(ADMIN_RED, string,1);
}
else if (!IsPlayerConnected(giveplayerid))
{
format(string, sizeof(string), "%d is not an active player.", giveplayerid);
SendClientMessage(playerid, RED, string);
}
}
else SendClientMessage(playerid, RED, "You're not an admin with the required level.");
return 1;
}
Quelle: http://forum.sa-mp.com/index.php?topic=40940.0