24.09.2017, 22:16
PHP код:
COMMAND:explode(playerid, params[])
{
if(pData[playerid][Admin] >= 3)
{
new bombid, type;
if(sscanf(params, "ii", bombid,type)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /explode [name/id] [type]");
if(!IsPlayerConnected(bombid)) return SendClientMessage(playerid, COLOR_RED, "Player not found.");
if(type < 1 || type > 13) return SendClientMessage(playerid,COLOR_RED,"Type of explosin [1 to 13]");
else
{
new Float:x,Float:y,Float:z,str[280],ircMsg[280];
GetPlayerPos(bombid,x,y,z);
CreateExplosion(x,y,z,type,5);
format(str,sizeof(str), "You have exploded %s (ID: %d) [Type: %d]",GetName(bombid),bombid, type);
SendClientMessage(playerid,COLOR_GREEN,str);
format(ircMsg, sizeof(ircMsg), "1,8 Admin %s (ID: %d) exploded %s (ID: %d) with explosin (Type %d)", GetName(playerid), playerid, GetName(bombid),bombid, type);
IRC_GroupSay(groupID, IRC_CHANNEL, ircMsg);
}
return 1;
}
else
{
return ShowMessage(playerid, COLOR_YELLOW, 1, 3);
}
}