PHP Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128];
new tmp[128];
if(strcmp(cmd, "/nuke", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /nuke [playerid/PartOfName]");
return 1;
}
new play;
new Float:slx, Float:sly, Float:slz;
play = ReturnUser(tmp);
if (IsPlayerAdmin(playerid))
{
if(IsPlayerConnected(play))
{
if(play != INVALID_PLAYER_ID)
{
GetPlayerPos(play, slx, sly, slz);
CreateExplosion(slx, sly, slz-10.0, 6, 11.0);
CreateExplosion(slx, sly, slz-10.0, 7, 11.0);
CreateExplosion(slx, sly, slz-10.0, 7, 11.0);
SendClientMessage(play, 0x800080AA, "You have died from a mysterious explosion");
SendClientMessageToAll(0x800080AA, "Somebody has died from a mysterious Explosion");
}
}
}
else
{
SendClientMessage(playerid, 0x800080AA, " You are not a bloody Admin !");
}
}
return 1;
}
return 0;
}
Not Tested yet, i ain't home.. If there's an error tell megh