CMD /admins in dialog
#1

Hi.

I make command /admins, which show player who admins are online. But i have problem in game it show only one line and i don't know how to show all connected admins (ex. 2admins = 2 line).

Код:
YCMD:admins(PARAMS)
{
    #pragma unused help
    #pragma unused params

    // Check if is any Admins online and if is 0 that start this public
	if(AdminsOnline() == 0) return SendMessage(playerid, C_RED, "-error- On the server isn't any admin", "-chyba- Na serveri nieje ziadny Admin");

	// Make string for message
    new str1[180], str[180];

    // And look all players
	loop(i, MAX_PLAYERS)
	{
		if (AdminsOnline() > 0)
		{
		    format(str, sizeof(str), ""TC_RED"%s "TC_WHITE"(Level: %d)\n", GetName(i), GetLevel(i));
		}
		else
		{
		    return Dialog(playerid, D_BASIC, BOX, "Admins online", "No admins online", "OK", "");
		}
	}
	format(str1, sizeof(str1), "%s", str);
	return Dialog(playerid, D_BASIC, BOX, "Admins online", str1, "OK", "");
}
Reply


Messages In This Thread
CMD /admins in dialog - by ylleron - 04.08.2011, 21:03
Re: CMD /admins in dialog - by Scarred - 04.08.2011, 21:09
Re: CMD /admins in dialog - by ylleron - 04.08.2011, 21:20
Re: CMD /admins in dialog - by Patchwerk - 14.08.2011, 17:03

Forum Jump:


Users browsing this thread: 1 Guest(s)