SA-MP Forums Archive
Admins online. - 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 online. (/showthread.php?tid=80937)



Admins online. - -eXo - 07.06.2009

When someone does /admins, its supposed to show what admins are online. It shows all of the admin ranks except 1338.
Код:
if (strcmp(cmd, "/admins", true) == 0)
	{
    if(IsPlayerConnected(playerid))
	  {
	    SendClientMessage(playerid, COLOR_WHITE, "|_______RLRP STAFF_______|");
			for(new i = 0; i < MAX_PLAYERS; i++)
			{
				if(IsPlayerConnected(i))
				{
				  if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] < 1338)
				  {
				    new admtext[64];
      if(PlayerInfo[i][pAdmin] == 1) { admtext = "Moderator"; }
				    else if(PlayerInfo[i][pAdmin] == 2) { admtext = "Staff"; }
				    else if(PlayerInfo[i][pAdmin] == 3) { admtext = "Senior Staff"; }
						else if(PlayerInfo[i][pAdmin] == 4) { admtext = "Management"; }
						else if(PlayerInfo[i][pAdmin] == 1337)	{ admtext = "Senior Management"; }
						else if(PlayerInfo[i][pAdmin] == 1338) { admtext = "Owner"; }
						else { admtext = "Moderator"; }
						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, COLOR_GREEN, string);
						}
					}
				}
			}
		}
		return 1;
	}



Re: Admins online. - lol2112 - 07.06.2009

Код:
&& PlayerInfo[i][pAdmin] < 1338
This should probably be

Код:
&& PlayerInfo[i][pAdmin] <= 1338