CMD:adminok(playerid, params[]){new S[128]; SendClientMessage(playerid, FONTOS, \"Elérhető Adminisztrátorok:\");for(new i; i < MAX_PLAYERS; i++){if(IsPlayerConnected(i)){ if(pInfo[pAdmin] == 1) { format(S, sizeof(S), \"[AC] Kezdő Adminisztrátor: %s\", pInfo[pANev]); SendClientMessage(playerid, FONTOS, S); } else if(pInfo[pAdmin] == 2) { format(S, sizeof(S), \"[AC] Haladó Adminisztrátor: %s\", pInfo[pANev]); SendClientMessage(playerid, FONTOS, S); } else if(pInfo[pAdmin] == 3) { format(S, sizeof(S), \"[AC] Tulajdonos: %s\", pInfo[pANev]); SendClientMessage(playerid, FONTOS, S); } else if(pInfo[pAs] == 1) { format(S, sizeof(S), \"[AC] Adminsegéd: %s\", Nev(i)); SendClientMessage(playerid, FONTOS, S); }}}return 1;}
COMMAND:admins(playerid,params[]){ SendClientMessage(playerid, ORANGE, \" \"); SendClientMessage(playerid, ORANGE, \"----\' Online Admins \'----\"); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(pInfo[Adminlevel] >= 1 || pInfo[Adminlevel] <= 5) { new admtext[64], id[MAX_PLAYER_NAME], string[256]; if(pInfo[Adminlevel] == 1) {admtext = \"Level: 1 (Administrator)\";} else if(pInfo[Adminlevel] == 2) {admtext = \"Level: 2, (Master Administrator)\";} else if(pInfo[Adminlevel] == 3) {admtext = \"Level: 3, (Lead Moderator)\";} else if(pInfo[Adminlevel] == 4) {admtext = \"Level: 4, (Master Moderator)\";} else if(pInfo[Adminlevel] == 5) {admtext = \"Level: 5, (Owner)\";} else if(IsPlayerAdmin(i)) {admtext = \"RCON Administrator\";} else {admtext = \"No admins online\";} GetPlayerName(i, id, sizeof(id)); format(string, 256, \"%s ( %s )\", id, admtext); SendClientMessage(playerid, GREEN, string); } } } return 1;}
CMD:admins(playerid){new maxadmins;new name[MAX_PLAYER_NAME];SCM(playerid,-1,\"Online adminok:\");for(new i=0;i<MAX_PLAYERS;i++){ if(pInfo[AdminLevel] > 0) { maxadmins++; GetPlayerName(i,name,sizeof(name)); format(str,sizeof(str),\"%s | Adminszintje: %d\",name,pInfo[AdminLevel]); SCM(playerid,-1,str); }}format(str,sizeof(str),\"Összes admin a szerveren: %d\",maxadmins);SCM(playerid,-1,str);return 1;}
A lényeg a következő.: Nem tekintettem még jól a kódot csak egy pillantást vetettem rá. Tehát a defensives az jó, csak nincs be írva az admin neved.Mivel a pANev le kéri a játékos (ez esetben) admin nevét.
CMD:adminok(playerid, params[]){new S[128]; SendClientMessage(playerid, ZOLD, \"Elérhető Adminisztrátorok:\");for(new i; i < MAX_PLAYERS; i++){if(IsPlayerConnected(i)){ if(pInfo[pAdmin] == 1) { format(S, sizeof(S), \"Moderátor: {ffffff}%s\", pInfo[pANev]); SendClientMessage(playerid, PIROS, S); } else if(pInfo[pAdmin] == 2) { format(S, sizeof(S), \"Admin: {ffffff}%s\", pInfo[pANev]); SendClientMessage(playerid, ZOLD, S); } else if(pInfo[pAdmin] == 3) { format(S, sizeof(S), \"Tulajdonos: {ffffff}%s\", pInfo[pANev]); SendClientMessage(playerid, NARANCS, S); }}}return 1;}