SA-MP Forums Archive
/Admins not working properly - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /Admins not working properly (/showthread.php?tid=123852)



/Admins not working properly - `Robo - 27.01.2010

It doesn't work, when I type /admins it shows no admins, but there are admins online because ... I'm a admin and I'm online lol...


Код:
if (strcmp(cmd, "/admins", true) == 0)
	{
    if(IsPlayerConnected(playerid))
	  {
	    SendClientMessage(playerid, COLOR_GREEN, "- RP Admins Online -");
			for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if(IsPlayerConnected(i))
				{
				  if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] < 1337)
				  {
				    new admtext[64];
				    if(PlayerInfo[i][pAdmin] == 1337) { admtext = "Lead Administrator"; }
				    else if(PlayerInfo[i][pAdmin] == 4) { admtext = "Level 4 Administrator"; }
						else if(PlayerInfo[i][pAdmin] == 3) { admtext = "Level 3 Administrator"; }
						else if(PlayerInfo[i][pAdmin] == 2)	{ admtext = "Level 2 Administrator"; }
						else if(PlayerInfo[i][pAdmin] == 1) { admtext = "Level 1 Administrator"; }
						else { admtext = "Level 1 Administrator"; }
						GetPlayerName(i, sendername, sizeof(sendername));
						if(AdminDuty[i] == 0)
						{
							format(string, 256, "%s: %s", admtext, sendername);
							SendClientMessage(playerid, COLOR_WHITE, string);
						}
						else
						{
						  format(string, 256, "%s: %s (on duty)", admtext, sendername);
							SendClientMessage(playerid, TEAM_VAGOS_COLOR, string);
						}
					}
				}
			}
		}
		return 1;
	}