13.05.2010, 22:09
Код:
dcmd_akill(playerid, params[]) { if(gPlayerInfo[playerid][PLAYER_LEVEL] < gCommands[AKILL]) { new string[100]; format(string, sizeof(string), "You must be Admin level %d to use that command!", gCommands[AKILL]); SendClientMessage(playerid, COLOUR_ORANGE, string); return 1: } new user; if(sscanf(params,"u",user)) { SendClientMessage(playerid, COLOUR_ORANGE, "/akill [id/name]"); return 1; } if(IsPlayerConnected(user) && user != playerid) { SetPlayerHealth(user, 0.0); new string[150]; format(string, sizeof(string), "You have been admin-killed by an admin"); SendClientMessage(user, COLOUR_ORANGE, string); format(string, sizeof(string), "You have successfully admin-killed player \'%s\'.", gPlayerInfo[user][PLAYER_NAME]); SendClientMessage(playerid, COLOUR_LIGHTBLUE, string); } else SendClientMessage(playerid, COLOUR_ORANGE, "You can not Akill yourself or a disconnected player."); return 1; }