SA-MP Forums Archive
Line problem in admins - 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: Line problem in admins (/showthread.php?tid=363674)



Line problem in admins - [M.A]Angel[M.A] - 28.07.2012

hello, today i'v updated my admin system (Lux Admin) , as you know the cmd /Admins in luxadmin is show admins every one in line , so i make it to show it in one line all the admins , but i got problem, up to 4 admins online and you type /admins , you can't see any admin the command is not working but if joined 4 or 3 .. admins u can see, i got idea to put all the admins in one line if we got more than 4 admins put them in other line but i can not make it can you help?

Thanks,

This is my admin code:

Код HTML:
dcmd_admins(playerid,params[])
{
	#pragma unused params

		if(AccInfo[playerid][Level] >= 0)
		{
	 		new bool:First2 = false;
	 		new Count, i;
		    new string[300];
			new adminname[MAX_PLAYER_NAME];
		    for(i = 0; i < MAX_PLAYERS; i++)
			if(IsPlayerConnected(i) && AccInfo[i][Level] > 0)
			Count++;

			if(Count == 0)
			return SendClientMessage(playerid,red, "No admins online.");

		    for(i = 0; i < MAX_PLAYERS; i++)
			if(IsPlayerConnected(i) && AccInfo[i][Level] > 0)
			{
				if(AccInfo[i][Level] > 0)
				{
					switch(AccInfo[i][Level])
    				{
				case 1: AdmRank = "Tester";
				case 2: AdmRank = "Co-Mod";
				case 3: AdmRank = "Mod";
				case 4: AdmRank = "Admin";
				case 5: AdmRank = "{05BDFA}Leader{FF0000}";
				case 6: AdmRank = "{05BDFA}Manager{FF0000}";
					}
				}
 				GetPlayerName(i, adminname, sizeof(adminname));
				if(!First2)
				{
					format(string, sizeof(string), "{05BDFA}Online admins:{FF0000} %s [%s]", PlayerName2(i),AdmRank);
					First2 = true;
				}
   					else format(string,sizeof(string),"%s, %s [%s]",string, PlayerName2(i),AdmRank);
	        }
		    return SendClientMessage(playerid,red,string);
		}
		else return ErrorMessages(playerid, 1);


}