/admins help
#1

Okay, i'm trying to make /admins and i've gotten like the basics of it down but i'm trying to make it so if there is more than 1 admin online it continues and everything like for example say there are 2 admins online it would show:

Present Admins: Admin1(ID)-L, Admin2(ID)-L

in stead of:

Present Admins: Admin1(ID)-L
Present Admins: Admin2(ID)-L

and if the list gets too big it would make a new line and continue for example:

Present Admins: Admin1(ID)-L, Admin2(ID)-L, Admin3(ID)-L, Admin4(ID)-L, Admin5(ID)-L
Present Admins: Admin6(ID)-L, Admin7(ID)-L

Here is what I currently have...

pawn Код:
dcmd_admins(playerid, params[])
{
  if(strlen(params)) return SendClientMessage(playerid, COLOR_RED, "Use /admins");
  new count = 0;
  new string[128];
  for(new i = 0; i < MAX_PLAYERS; i ++)
  {
    if(IsPlayerConnected(i))
    {
      new player[24];
      GetPlayerName(i, player, 24);
      if(dUserINT(player).("AdminLevel") >= 1 && dUserINT(player).("AdminLevel") <= 6)
      {
        format(string, sizeof(string), "Present Admins: %s(%i)-%i",player,i,dUserINT(player).("AdminLevel"));
        SendClientMessage(playerid, COLOR_CYAN, string);
        count++;
      }
    }
  }
  if(count == 0)
  {
    SendClientMessage(playerid, COLOR_CYAN, "No admins present");
  }
  return 1;
}
If anybody could help me out on this it would be greatly appreciated, I know it can be done I just don't know how.

P.S: I've searched and I must have looked at a dozen different admin scripts and couldn't figure it out.
Reply


Messages In This Thread
/admins help - by lavamike - 16.02.2009, 19:44
Re: /admins help - by andy4ever - 16.02.2009, 20:01
Re: /admins help - by lavamike - 16.02.2009, 20:12
Re: /admins help - by andy4ever - 16.02.2009, 21:03
Re: /admins help - by lavamike - 16.02.2009, 21:05

Forum Jump:


Users browsing this thread: 1 Guest(s)