26.06.2015, 10:03
i made my own command like this
and i use IsPlayerAnAdmin Function
Код:
CMD:akill(playerid,params[]) { if(!IsPlayerAnAdmin(playerid,4))return SendClientMessage(playerid,0xFF0000FF,"You're not allowed to use this command!"); new pID, string[128],string3[128]; if(sscanf(params,"u",pID))return SendClientMessage(playerid,COLOR_GREEN,"/akill [id]]"); format(string,sizeof(string),"You adminkilled %s.",PlayerName(pID)); for(new i=0;i<GetMaxPlayers();i++) { if(IsPlayerConnected(i)) { if(IsPlayerAnAdmin(i,1)) { format(string3,sizeof(string3),"A: %s used the AKILL command.",PlayerName(playerid)); SendClientMessage(i,COLOR_ORANGE,string3); } } } SendClientMessage(playerid,COLOR_LIGHTBLUE,string); SendClientMessage(pID,COLOR_ORANGE,"* An admin killed you by a command."); SetPlayerHealth(pID,0); return 1; }