SA-MP Forums Archive
Help Admins Dialog - 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: Help Admins Dialog (/showthread.php?tid=562992)



Help Admins Dialog - itachi - 13.02.2015

please how to convert admins dialog:
dcmd_admins(playerid, params[])
{
#pragma unused params
new string[128];
SendClientMessage(playerid,COLOR_GREEN,"********** *******[{FF0000}Online Admins{33AA33}]***************");
for(new i = 0;i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerAdmin(i) && Admin[i] == 0)
{
format(string, 60, " RCON [ %d ] %s",i,Jmeno(i));
SendClientMessage(playerid,0x77FF00FF,string);
noadmins ++;
}else
if(Admin[i] > 0 && !IsPlayerAdmin(i))
{
format(string, 60, "Level %d [ %d ] %s",Admin[i],i,Jmeno(i));
SendClientMessage(playerid,0x77FF00FF,string);
noadmins ++;
}
else
if(IsPlayerAdmin(i) && Admin[i] > 0)
{
format(string, 60, "Level %d + RCON [ %d ] %s",Admin[i],i,Jmeno(i));
SendClientMessage(playerid,0x77FF00FF,string);
noadmins ++;
}
}
}
if(noadmins == 0)
{
format(string, 60, "Not Online Admins");
SendClientMessage(playerid,COLOR_RED,string);
}
SendClientMessage(playerid,COLOR_GREEN,"********** ******************************************");
noadmins = 0;
return 1;
}



Re: Help Admins Dialog - HazardouS - 13.02.2015

Declare a big enough array and after you format the "string" array, use strcat (https://sampwiki.blast.hk/wiki/Strcat) instead of sending the message to the client. Then, at the end of your command, you should have that big array of yours ready to be displayed in a dialog.