14.01.2012, 12:36
Hello, Me and my friend are making a gamemode. Its going very well so far just have some minor problems.
This is a problem that I dont know how to fix:
The goal is to do /admins and then u see a list of all people online with AdminLevel 1 or higher.
But It now just shows this when there are 5 players online
players names are:
Maurits - admin lvl 0
Phil - admin lvl 0
Matt admin lvl 2
Ric - admin lvl 3
milan - admin lvl 5
Reality Roleplay Online Administrators:
[0]Maurits - lvl 0
[1]Maurits - lvl 0
[2]Maurits - lvl 0
[3]Maurits - lvl 0
[4]Maurits - lvl 0
Any idea what the problem could be?
This is a problem that I dont know how to fix:
The goal is to do /admins and then u see a list of all people online with AdminLevel 1 or higher.
But It now just shows this when there are 5 players online
players names are:
Maurits - admin lvl 0
Phil - admin lvl 0
Matt admin lvl 2
Ric - admin lvl 3
milan - admin lvl 5
Reality Roleplay Online Administrators:
[0]Maurits - lvl 0
[1]Maurits - lvl 0
[2]Maurits - lvl 0
[3]Maurits - lvl 0
[4]Maurits - lvl 0
Any idea what the problem could be?
Код:
CMD:admins(playerid, params[]) { new string[128], CountAdmins, Name[MAX_PLAYER_NAME]; foreach(Player, i) { GetPlayerName(i, Name, sizeof(Name)); if(PlayerInfo[playerid][AdminLevel] >= 1) { CountAdmins = 1; } } if(CountAdmins == 1) { SendClientMessage(playerid, 0xD8D8D8FF, "Reality Roleplay Online Administrators"); foreach(Player, i) { if(PlayerInfo[playerid][AdminLevel] >= 1) { format(string, sizeof(string), "Admin: %s (ID: %d) - Level: %d", Name, i, PlayerInfo[i][AdminLevel]); SendClientMessage(playerid, 0xD8D8D8FF, string); } } } if(CountAdmins == 0) SendClientMessage(playerid, 0xD8D8D8FF, "There are no admins online!"); CountAdmins = 0; return 1; }