SA-MP Forums Archive
Help with command 2 - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with command 2 (/showthread.php?tid=127529)



Help with command 2 - DokerJr - 13.02.2010

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 ...


Re: Help with command 2 - LuxurioN™ - 13.02.2010

My AdminScript have this system. See: LuX Admin System


Re: Help with command 2 - DokerJr - 14.02.2010

Ok !

My '/admins' command is this

http://pastebin.com/m39dfdc74


Re: Help with command 2 - DokerJr - 14.02.2010

Sorry for double post but nobody answer me ?


Re: Help with command 2 - smeti - 14.02.2010

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;
}



Re: Help with command 2 - Niixie - 14.02.2010

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


Re: Help with command 2 - smeti - 14.02.2010

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 ...