28.02.2018, 18:03
So when an admin leaves the game, His name will still be shown on the admins list!
Код:
CMD:admins(playerid, params[]) { if(connected[playerid] == true) return GameTextForPlayer(playerid, "~r~Spawn First", 5000, 5); if(pInfo[playerid][Admin] < 1) return SendClientMessage(playerid, -1, "{C3C3C3}(INFO) You don't have the priviliges to use this command."); new str[128], count=0; for(new j = 1; j <= 3; j++) { for(new i = 0; i < MAX_PLAYERS; i++) { if(pInfo[i][Admin] == j) { format(str, 256, "{66ff99}%s (level: %d)", PlayerName[i], pInfo[i][Admin]); SendClientMessage(playerid, -1, str); count ++; } } } format(str, sizeof(str), "{66ff99}There are currently %d admins online.", count); SendClientMessage(playerid, -1, str); return 1; }