/admins command isen't working ...
#1

Hello,
I have made an /admins command, that will display all admins in the game on a list. Only my problem is that it don't work. The list displays only one admin.
Код:
dcmd_admins(playerid, cmdtext[]) {
	#pragma unused cmdtext
    SendClientMessage(playerid, ADMINFS_MESSAGE_COLOR, "Admins online:");
	new admins = 0;
	new string[100];
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			if(pInfo[i][adminlevel] == 1)
   			{
				GetPlayerName(i, pname, sizeof(pname));
				format(string, sizeof(string), "%d) Name: %s, ID: %d", admins, pname, i,(i));
				SendClientMessage(playerid, COLOR_GREY, string);
				admins++;
				return 1;
			}
		}
	}
	if(admins == 0)
	{
		SendClientMessage(playerid,0xFF0000AA, "There are currently no admins online");
		return 1;
	}
	return 1;
}
Please help me if you know the answer.
Greetz,
Danny
Reply


Messages In This Thread
/admins command isen't working ... - by Danny - 28.08.2010, 08:36
Re: /admins command isen't working ... - by Claude - 28.08.2010, 09:06
Re: /admins command isen't working ... - by Calgon - 28.08.2010, 09:09
Re: /admins command isen't working ... - by Jochemd - 28.08.2010, 09:37

Forum Jump:


Users browsing this thread: 1 Guest(s)