CMD:Admins(playerid, params[]) { new string[128]; new count=0; new AFK[128]; // ---> AFK SendClientMessage(playerid, COLOR_WHITE, "Admins Online"); for(new i=0; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][pAdmin] > 0) { new pName[MAX_PLAYER_NAME]; GetPlayerName(i, pName, sizeof(pName)); format(string, 256, "( Admin %d ) %s [Id:%d] %s {008080}[%s]",PlayerInfo[i][pAdmin],pName,i,AFK); // ---> AFK // ---> and format(string, 256, "( Admin %d ) %s [Id:%d] %s",PlayerInfo[i][pAdmin],pName,i); // ---> Back SendClientMessage(playerid, COLOR_GREY, string); count++; } } } return 1; } |
GetPlayerName(i, pName, sizeof(pName)); format(string, 256, "( Admin %d ) %s [Id:%d] %s {008080}[%s]",PlayerInfo[i][pAdmin],pName,i,AFK); // ---> AFK // ---> and format(string, 256, "( Admin %d ) %s [Id:%d] %s",PlayerInfo[i][pAdmin],pName,i); // ---> Back SendClientMessage(playerid, COLOR_GREY, string);
new AFK[128]; // ---> AFK
new AFK[128]; // ---> AFK
format(AFK,128,"%s",PlayerInfo[i][AFK]);
enum pInfo { pPassword[129], pAdmin, pLevel, pVip, pMoney, pScore, pSkin, pKills, pDeaths, pBanned } |
enum pInfo { pPassword[129], pAdmin, pLevel, pVip, pMoney, pScore, pSkin, pKills, pDeaths, pAfk, pBanned } |
If(AFK[playerid]>0) { format(string, 256, "( Admin %d ) %s [Id:%d] %s {008080}[%s]",PlayerInfo[i][pAdmin],pName,i,AFK); } else { format(string, 256, "( Admin %d ) %s [Id:%d] %s",PlayerInfo[i][pAdmin],pName,i); }
enum pInfo { pAFK, }; CMD:admins(playerid, params[]) { static string[128], name[24]; SendClientMessage(playerid, -1, "Admins online:"); for(new I = 0; I < MAX_PLAYERS; I++) if(PlayerInfo[I][pAdmin]) { GetPlayerName(I, name, 24); format(string, sizeof(string), "( Admin %d) %s [Id: %d] Status: %s", PlayerInfo[I][pAdmin], name, I, (PlayerInfo[I][pAFK]) ? ("Away") : ("Available")); SendClientMessage(playerid, -1, string); } return 1; }