12.01.2013, 00:43
Hi I want to know how to make a command that shows the player all the admin that are on when they type /admins. And another one to make other players admins when I type /makeadmin [id] | How do I do it?
CMD:admins(playerid,params[]) { new count; SendClientMessage(playerid,GREEN,"Online admins"); for(new i=0;i<MAX_PLAYERS;i++) { if(IsPlayerConnected(i) && PlayerAdmin[i] > 0) { format(str,144,"*%d Admin %s",PlayerAdmin[i],PlayerName[i]); SendClientMessage(playerid,GREEN,str); count ++; } } if(count == 0) SendClientMessage(playerid,RED,"no admins online!"); return 1; }
Код:
CMD:admins(playerid,params[]) { new count; SendClientMessage(playerid,GREEN,"Online admins"); for(new i=0;i<MAX_PLAYERS;i++) { if(IsPlayerConnected(i) && PlayerAdmin[i] > 0) { format(str,144,"*%d Admin %s",PlayerAdmin[i],PlayerName[i]); SendClientMessage(playerid,GREEN,str); count ++; } } if(count == 0) SendClientMessage(playerid,RED,"no admins online!"); return 1; } |