SA-MP Forums Archive
/admins bug? - 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)
+--- Thread: /admins bug? (/showthread.php?tid=288974)



/admins bug? - ImprezBart - 09.10.2011

Hey, i just modified this command but when i do /admins every admin is shown as Community Director

Код:
if(strcmp(cmd, "/admins", true) == 0) // By Jay Cortrell
	{
	    if(IsPlayerConnected(playerid))
	    {
	    	if(PlayerInfo[playerid][pAdmin] == 0)
	    	{
	    	    SendClientMessage(playerid, COLOR_WHITE, "LS-RPG Administration Team");
	    	    for(new i = 0; i < MAX_PLAYERS; i++)
				{
				    if(IsPlayerConnected(i))
				    {
						if(PlayerInfo[i][pAdmin] > 1 && !IsElite[i] && PlayerInfo[i][pStealthed] == 0)
						{
                            //new plevel = PlayerInfo[playerid][pLevel];
							//new hlevel = PlayerInfo[playerid][pHelper];
							new alevel = PlayerInfo[playerid][pAdmin];
							new stealthed = PlayerInfo[playerid][pStealthed];
							GetPlayerName(i, giveplayer, sizeof(giveplayer));
                            if(alevel >= 1 && stealthed == 0) format(string, sizeof(string), "Moderator %s",giveplayer);
                            if(alevel >= 2 && stealthed == 0) format(string, sizeof(string), "Executive Administrator %s",giveplayer);
                            if(alevel >= 1337 && stealthed == 0) format(string, sizeof(string), "Co Director %s",giveplayer);
                            if(alevel >= 99998 && stealthed == 0) format(string, sizeof(string), "Community Vice-Director %s",giveplayer);
                            if(alevel >= 99999 && stealthed == 0) format(string, sizeof(string), "Community Director %s",giveplayer);
							//format(string, sizeof(string), "%d Admin: %s",PlayerInfo[i][pAdmin],giveplayer);
			            	SendClientMessage(playerid, COLOR_GREY, string);
						}
					}
				}
	    	}
	    	else if(PlayerInfo[playerid][pAdmin] > 1)
	    	{
	    	    SendClientMessage(playerid, COLOR_WHITE, "LS-RPG Administration Team");
	    	    for(new i = 0; i < MAX_PLAYERS; i++)
				{
				    if(IsPlayerConnected(i))
				    {
						if(PlayerInfo[i][pAdmin] > 0 && !IsElite[i])
						{
                            //new plevel = PlayerInfo[playerid][pLevel];
							//new hlevel = PlayerInfo[playerid][pHelper];
							new alevel = PlayerInfo[playerid][pAdmin];
							new stealthed = PlayerInfo[playerid][pStealthed];
							GetPlayerName(i, giveplayer, sizeof(giveplayer));
                            if(alevel >= 1 && stealthed == 0) format(string, sizeof(string), "Moderator %s", sendername);
                            if(alevel >= 2 && stealthed == 0) format(string, sizeof(string), "Executive Administrator %s",giveplayer);
                            if(alevel >= 1337 && stealthed == 0) format(string, sizeof(string), "Co Director %s",giveplayer);
                            if(alevel >= 99998 && stealthed == 0) format(string, sizeof(string), "Assistant Director %s",giveplayer);
                            if(alevel >= 99999 && stealthed == 0) format(string, sizeof(string), "Community Director %s",giveplayer);
			            	SendClientMessage(playerid, COLOR_GREY, string);
							//GetPlayerName(i, giveplayer, sizeof(giveplayer));
							//format(string, sizeof(string), "%d Admin: %s",PlayerInfo[i][pAdmin],giveplayer);
			            	//SendClientMessage(playerid, COLOR_GREY, string);
						}
					}
				}
	    	}
		}
	    return 1;
	}



Re: /admins bug? - DaRkAnGeL[NBK] - 09.10.2011

have you defined all you need to for example the admin ranks? i mean on LuxAdmin they have defines with rank 5 - Professional Admin


Re: /admins bug? - GrimR - 09.10.2011

Isn't it also easier to use figures like levels 1-5 rather than stuff like 9998 lol.


Re: /admins bug? - ImprezBart - 09.10.2011

Quote:
Originally Posted by GrimR
Посмотреть сообщение
Isn't it also easier to use figures like levels 1-5 rather than stuff like 9998 lol.
Lol yea, i didn't had the time to change it yet, it's a sarp edit.


Re: /admins bug? - ImprezBart - 10.10.2011

bump