Please help please ! - 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: Please help please ! (
/showthread.php?tid=363466)
Please help please ! -
[M.A]Angel[M.A] - 27.07.2012
hello , i 'v code for admins in luxadmins , i just want when some one type /admins show all the admins , in this code its show but if more than 4 players admins not show anyone
CODE:
Код:
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);
}
so please i need help how to fix it i need if there are more than 4 admins to put other admins in new line not in the same line example:
Admins: Player1,Player2,Player3,Player4
Player5,Player6.. etc
Can to do this?
Re: Please help please ! -
[M.A]Angel[M.A] - 27.07.2012
Anyone know please?