05.04.2013, 15:30
Hello!
Here is my code of /explode command, but when I compile it, I get 1 ERROR and 1 WARNING.
CODE:
Here is my code of /explode command, but when I compile it, I get 1 ERROR and 1 WARNING.
CODE:
PHP код:
CMD:explode(playerid, params[])
{
if(gPlayerInfo[playerid][PLAYER_LEVEL] < 3)return SendClientMessage(playerid, COLOR_RED, "You are not allowed to use this command!");
new string[128], ID, Float:x, Float:y, Float:z;
if(sscanf(params, "u", ID)) SendClientMessage(playerid, COLOR_RED, "Usage: /explode [playerid/name]");
else if(!IsPlayerConnected(ID)) SendClientMessage(playerid, COLOR_RED, "ERROR: This player is not connected.");
else
{
GetPlayerPos(ID, x, y, z);
CreateExplosion(x, y, z, 12, 10.0);
format(string,sizeof(string), "You have exploded %s(%d).", PlayerName(ID), ID);
SendClientMessage(playerid, COLOR_PURPLE, string);
}
return;
}