PDA

View Full Version : Problem with a command


Allu
10/04/2012, 06:05 PM
if (strcmp(cmd, "/admins", true) == 0)
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, COLOR_GREEN, "| Admins Online: |");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] <= 1337)
{
if(PlayerInfo[i][pAdmin] == 1337) { tekst = "{13C6E9}Omanik"; }
else if(PlayerInfo[i][pAdmin] == 3) { tekst = "{369BAF}Administraator"; }
else if(PlayerInfo[i][pAdmin] == 2) { tekst = "{3A8A9A}Moderaator"; }
else if(PlayerInfo[i][pAdmin] == 1) { tekst = "{2AC72D}Abistaja"; }
}
GetPlayerName(i, sendername, sizeof(sendername));
if(PlayerInfo[i][pDuty] == 0)
{
format(string, sizeof(string), "%s: {FFFFFF}%s", tekst, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
}
else if(PlayerInfo[i][pDuty] == 1)
{
format(string, sizeof(string), "%s: {FFFFFF}%s {33AA33}- Tööl", tekst, sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
}
}
return 1;
}


So my problem here is when I'm typing the command in game then it shows all the players in the server and shows them as Omanik=Owners(a.k.a level 1337 admin). And yes, all the players with admin level 0-s. I can't figure out here what I'm doing wrong.

Allu
11/04/2012, 01:01 PM
I'm still in trouble :(

Allu
14/04/2012, 09:44 AM
Bump...

Allu
16/04/2012, 05:47 PM
bump