[HELP ME] /admins command
#1

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
Reply
#2

simple, but don't forget define this..
pawn Код:
#include <zcmd>
C:
pawn Код:
enum PlayerInfo
{
    Adminlevel
}
new pInfo[MAX_PLAYERS][PlayerInfo];
here the command
pawn Код:
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;
}
try to learn something...Don't ask things like this here, C: we have a section about tutorials
RafaelZam
Reply
#3

Quote:
Originally Posted by Rafael_Zambrano
Посмотреть сообщение
simple, but don't forget define this..
pawn Код:
#include <zcmd>
C:
pawn Код:
enum PlayerInfo
{
    Adminlevel
}
new pInfo[MAX_PLAYERS][PlayerInfo];
here the command
pawn Код:
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;
}
try to learn something...Don't ask things like this here, C: we have a section about tutorials
RafaelZam
Thx man this helped
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)