14.02.2014, 10:06
Hi,
I have an cmd to see how many admins are online:
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.
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 !"); }
Thank you.