30.10.2010, 18:24
Код:
IRCCMD:explode(botid, channel[], user[], host[], params[]) { if(IRC_IsOp(botid,channel,user)) { GetPlayerName(playerid, sendername, sizeof(sendername)); giveplayerid = strval(tmp); GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); if(IsPlayerConnected(giveplayerid)) { format(string, sizeof(string), "You exploded %s",giveplayer); SendClientMessage(playerid,COLOR_RED,string); SetPlayerHealth(giveplayerid, 10); new Float:boomx, Float:boomy, Float:boomz; GetPlayerPos(giveplayerid,boomx, boomy, boomz); CreateExplosion(boomx, boomy , boomz, 7, 10); new msg[128]; format(msg,sizeof(msg),"0,4Admin %s has exploded %s (type 7 explosion)", nameee, giveplayer); IRC_GroupSay(IRC_Group, EchoChan, msg); IRC_GroupSay(IRC_Group,"PRIVATE CHAN",msg); GetPlayerName(playerid, nameee, 30); printf("[Command] %s has used /explode to explode %s", nameee, giveplayer); } else { format(string, sizeof(string), "%d is not an active player.", giveplayerid); IRC_GroupSay(IRC_Group, EchoChan, msg); } { return IRC_Say(IRC_EchoConnection[0],channel,"4Invalid."); } return 1; }