28.10.2013, 23:43
I need help making a /admins cmd to show players what admins are online i also need a cmd to hide the admins from the list,can someone please help me.
Thanks-Jeremy
Thanks-Jeremy
#include <zcmd>
enum PlayerInfo
{
Adminlevel
}
new pInfo[MAX_PLAYERS][PlayerInfo];
CMD:admins(playerid, params[]) //thats says, you must use /admins to see the admins
{
SendClientMessage(playerid, -1, "____Admins Online___");
for(new i = 0; i < MAX_PLAYERS; i++) //show you all admins online/users
{
if(pInfo[i][Adminlevel] >= 1)//checks if is admin
{
new string[128], pname[24];
GetPlayerName(i, pname, sizeof(pname)); // gets the admin name
format(string, sizeof(string), "%s {FFFFFF} Level: %d (ID:%d)", pname, pInfo[i][Adminlevel], i);
SendClientMessage(playerid, -1, string);
}
}
return 1;
}
simple, but don't forget define this..
pawn Код:
pawn Код:
pawn Код:
![]() RafaelZam |