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

I guess I know what your talking about, because I know you from Argonath. You want it to look like Argonath, am I right? I guess I have this, I will look for it and post it right away when I find it
Reply
#3

Quote:
Originally Posted by Andyfer
I guess I know what your talking about, because I know you from Argonath. You want it to look like Argonath, am I right? I guess I have this, I will look for it and post it right away when I find it
I mean that I need help on the adding on to one line kinda thing in general
Reply
#4

Ok now I get you, I think I have this. I will test it and see if it works, if it does, I will post it here
Reply
#5

Quote:
Originally Posted by Andyfer
Ok now I get you, I think I have this. I will test it and see if it works, if it does, I will post it here
Ah, sorry I figured it out myself

But if you still want to post it here you can maybe it will help someone else one day
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)