Is it the same ?
#1

Hi,



I have an cmd to see how many admins are online:

Код:
CMD:adminco(playerid, params[])
{
	if(pInfo[playerid][Admin] > 1)
	{
		SendClientMessage(playerid, -1, "Les membres du staff en ligne sont:");
		foreach(new i : Player)
		{
			if(pInfo[i][Admin] >= 1)
			{
				new string[50];
				GetPlayerName(i, joueurdestinataire, sizeof(joueurdestinataire));
				format(string, sizeof(string), "%s | Niveau Admin: %d", joueurdestinataire, pInfo[i][Admin]);
				SendClientMessage(playerid, -1, string);
			}
		} 
		return 1;
	}
	return SendClientMessage(playerid, Rouge,"La commande entrйe est inconnue !");
}
And I have a question about my string, is it better(for optimization or something) to put it in the foreach loop or to put it before the loop ?
Thank you.
Reply


Messages In This Thread
Is it the same ? - by anou1 - 14.02.2014, 10:06
Re: Is it the same ? - by Konstantinos - 14.02.2014, 10:10
Re: Is it the same ? - by anou1 - 14.02.2014, 10:14

Forum Jump:


Users browsing this thread: 1 Guest(s)