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: ADMINS DIALOG (
/showthread.php?tid=628504)
ADMINS DIALOG -
itachi - 11.02.2017
please need help admins to dialog
Код:
CMD:admins(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
new string[128];
SendClientMessage(playerid, 0xFC9803AA, "Administrбtoři On-line:");
for(new i=0; i <= GetPlayerPoolSize(); i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerAdmin(i) && AdminLevel[i] < 1)
{
format(string, 128, "[On-line] %s - > RCON", jmeno(i));
SendClientMessage(playerid, 0x0EDBF1AA, string);
}
else if(AdminLevel[i] > 0 && !IsPlayerAdmin(i))
{
format(string, 128, "[On-line] %s - > ADMIN", jmeno(i));
SendClientMessage(playerid, 0x0EDBF1AA, string);
}
else if(IsPlayerAdmin(i) && AdminLevel[i] > 0)
{
format(string, 128, "[On-line] %s - > Admin+ RCON", jmeno(i));
SendClientMessage(playerid, 0x0EDBF1AA, string);
}
}
}
}
return 1;
}
Re: ADMINS DIALOG -
Yochui - 11.02.2017
I've seen a tutorial about this a couple of weeks ago, you can try this:
pawn Код:
CMD:admins(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
new string[128];
new dialog[256];
SendClientMessage(playerid, 0xFC9803AA, "Administrбtori On-line:");
for(new i=0; i <= GetPlayerPoolSize(); i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerAdmin(i) && AdminLevel[i] < 1)
{
format(string, 128, "[On-line] %s - > RCON\n", jmeno(i));
strcat(dialog, string);
}
else if(AdminLevel[i] > 0 && !IsPlayerAdmin(i))
{
format(string, 128, "[On-line] %s - > ADMIN\n", jmeno(i));
strcat(dialog, string);
}
else if(IsPlayerAdmin(i) && AdminLevel[i] > 0)
{
format(string, 128, "[On-line] %s - > Admin+ RCON\n", jmeno(i));
strcat(dialog, string);
}
}
}
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Administrбtori On-line", dialog, "OK", "Cancel");
}
return 1;
}
not sure if it works, haven't tested it.