16.05.2015, 12:49
Hello im trying to make /admins shows the online admins in the channel :
Код:
COMMAND:admins(playerid) { if(!PLAYERLIST_authed[playerid]) return SendClientError(playerid, "You are not logged in!"); if(PlayerInfo[playerid][playerlvl] == 0) return SendClientError(playerid, "You need to Login order to use This command!"); SendClientMessage(playerid, COLOR_HELPEROOC, "=========================- Administrators:"); for(new i=0;i<MAX_PLAYERS;i++) { if(iAFKp[i] > 3) { format(iStr, sizeof(iStr)," {f47c1b}[AFK]"); } else { format(iStr, sizeof(iStr),""); } new pAdmin[24]; if(PlayerTemp[i][adminduty] > 0) { format(pAdmin, sizeof(pAdmin)," {6BDE54}[ADMIN DUTY]"); } else { format(pAdmin, sizeof(pAdmin),""); } if((PlayerInfo[i][pero] > 0 && PlayerInfo[i][admin] != 0 && PlayerInfo[i][admin] != 0) && IsPlayerConnected(i) && PLAYERLIST_authed[i]) { SendClientMSG(playerid, COLOR_LIGHTGREY, "{e1e3e6} - %s %s [%s] (ID: %d)%s%s", AdminLevelName(i), RPName(i), PlayerInfo[i][forumname], i, pAdmin, iStr); } } SendClientMessage(playerid, COLOR_HELPEROOC, "=========================- Helpers:"); for(new i=0;i<MAX_PLAYERS;i++) { if(iAFKp[i] > 3) { format(iStr, sizeof(iStr)," {f47c1b}[AFK]"); } else { format(iStr, sizeof(iStr),""); } new pHelper[24]; if(PlayerTemp[i][helperduty] > 0) { format(pHelper, sizeof(pHelper)," {6BDE54}[HELPER DUTY]"); } else { format(pHelper, sizeof(pHelper),""); } if((PlayerInfo[i][helper] > 0 && PlayerInfo[i][pero] != 0) && IsPlayerConnected(i) && PLAYERLIST_authed[i]) { SendClientMSG(playerid, COLOR_LIGHTGREY, "{e1e3e6}- %s %s [%s] (ID: %d)%s%s", AdminLevelName(i), RPName(i), PlayerInfo[i][forumname], i, pHelper, iStr); } } SendClientMessage(playerid, COLOR_HELPEROOC, "---------------------- IRC Administrator:"); for(new i=0;i<MAX_PLAYERS;i++) { //Help here Please } } return 1; }