18.07.2011, 17:47
When I type /admins it comes up like this, Say 3 people on the server and one admin
Admins online
Server moderater
Admins online
Admins online
Comes up 3 times because 3 players are online, Anyone can help please?
Admins online
Server moderater
Admins online
Admins online
Comes up 3 times because 3 players are online, Anyone can help please?
pawn Код:
if(strcmp(cmd, "/admins", true) == 0) {
new adminname[24];
new admins = 0;
new string[256];
for(new i = 0; i < MAX_PLAYERS; i++)
if (IsPlayerConnected(i)) {
{
SendClientMessage(playerid, 0xFFFFFFFF,"Currently online admins:");
if(PlayerInfo[i][AdminLevel] == 1 && toggleadmin[i] == 0)
{
GetPlayerName(i, adminname, 24);
format(string,sizeof string,"%s - Server Moderator (Level 1)", adminname);
SendClientMessage(playerid,0xFFFFFFFF,string);
admins++;
}
if(PlayerInfo[i][AdminLevel] == 2 && toggleadmin[i] == 0)
{
GetPlayerName(i, adminname, 24);
format(string,sizeof string,"%s - Moderator + (Level 2)", adminname);
SendClientMessage(playerid,0xFFFFFFFF,string);
admins++;
}
if(PlayerInfo[i][AdminLevel] == 3 && toggleadmin[i] == 0)
{
GetPlayerName(i, adminname, 24);
format(string,sizeof string,"%s - Admin (Level 3)", adminname);
SendClientMessage(playerid,0xFFFFFFFF,string);
admins++;
}
if(PlayerInfo[i][AdminLevel] == 4 && toggleadmin[i] == 0)
{
GetPlayerName(i, adminname, 24);
format(string,sizeof string,"%s - Admin + (Level 4)", adminname);
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
admins++;
}