Help with command 2
#1

Hello ~

Please help me again



How to make them to be arranged by level ?
Because they are arranged by ID !

Example:

Admin 1 *******
Admin 2 *******
Admin 3 *******
Admin 4 *******
etc ...
Reply
#2

My AdminScript have this system. See: LuX Admin System
Reply
#3

Ok !

My '/admins' command is this

http://pastebin.com/m39dfdc74
Reply
#4

Sorry for double post but nobody answer me ?
Reply
#5

A little bit complicated but the logic something like that:

pawn Код:
//Command
    new
      MaxPlayers = GetMaxPlayers(),
      string[128];
     
    for(new i; i < MaxPlayers; i++) if(!IsPlayerConnected(i) || PlayerInfo[i][pAdmin] != 1) continue;
    {
        format(string, 128, "Helper level %d - %s [%d]",PlayerInfo[i][pAdmin], Pname(i), i);
        SendClientMessage(playerid, 0x99CCCCAA, string);
    }
   
    for(new i; i < MaxPlayers; i++) if(!IsPlayerConnected(i) || PlayerInfo[i][pAdmin] != 2) continue;
    {
        format(string, 128, "Global Tester level %d - %s [%d]",PlayerInfo[i][pAdmin], Pname(i), i);
        SendClientMessage(playerid, 0x99CCCCAA, string);
    }
   
    for(new i; i < MaxPlayers; i++) if(!IsPlayerConnected(i) || PlayerInfo[i][pAdmin] != 3) continue;
    {
        format(string, 128, "Moderator level %d - %s [%d]",PlayerInfo[i][pAdmin], Pname(i), i);
        SendClientMessage(playerid, 0x99CCCCAA, string);
    }
   
    for(new i; i < MaxPlayers; i++) if(!IsPlayerConnected(i) || PlayerInfo[i][pAdmin] != 4) continue;
    {
        format(string, 128, "Admin level %d - %s [%d]",PlayerInfo[i][pAdmin], Pname(i), i);
        SendClientMessage(playerid, 0x99CCCCAA, string);
    }
//......
   
stock pName(playerid)
{
  new name[MAX_PLAYER_NAME];
  GetPlayerName(playerid, name, sizeof(name));
  return name;
}
Reply
#6

Phento, you dont need to make a loop each time and again. once is good.
Reply
#7

Quote:
Originally Posted by Niixie
Phento, you dont need to make a loop each time and again. once is good.
I know but this was the request:

Quote:
Originally Posted by ■■ DokerJr ■■
Example:

Admin 1 *******
Admin 2 *******
Admin 3 *******
Admin 4 *******
etc ...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)