30.03.2014, 05:51
Код:
CMD:explode(playerid,params[]) { if(pInfo[playerid][Adminlevel] < 5) return SendClientMessage(playerid, COLOR_RED, ""ERROR_MESSAGE""); new TargetID, reason[20]; new targetname[MAX_PLAYER_NAME]; GetPlayerName(TargetID, targetname, sizeof(targetname)); if(sscanf(params, "us", TargetID, reason)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /explode [id] [reason]"); if(TargetID == INVALID_PLAYER_ID || !IsPlayerConnected(TargetID )) return SendClientMessage(playerid, COLOR_RED, "* Player Is Not Connected."); new string[300], srting1[128]; new Float:burnx, Float:burny, Float:burnz; GetPlayerPos(TargetID,burnx, burny, burnz); CreateExplosion(burnx, burny , burnz, 7,10.0); format(string,sizeof(string),"** EXPLODE: %s (%d) (ADMIN EXPLODE) Has Been EXPLODED By An Admin. (Reason: %s)", targetname,TargetID,reason); SendClientMessageToAll(COLOR_HOTPINK,string); format(srting1,sizeof(srting1),"You have exploded %s (%d)", targetname,TargetID); SendClientMessage(playerid,COLOR_HOTPINK,srting1); return 1; }