Need Help of Admin System!
#1

Hello Friends! I am really working hard to find or create the Admin Levels and the Command /admins to See the Online Admins But Always I failed

Can any one give me the Admin Levels Script and CMD of /admins to Show the Online Admins?
Reply
#2

Please Help me! I am waiting.
Reply
#3

Read the rules. It's against the rules to bump your threads every 20 minutes.. That's why most users avoid to reply to those threads.
Reply
#4

can you please search before posting?
Reply
#5

I already did. But couldn't find any useful Topic.
Reply
#6

Ugh, here

pawn Код:
CMD:admins(playerid, params[])
{
     new string[256], pname[MAX_PLAYER_NAME];
     foreach(Player, i)
     {
          if(PlayerInfo[i][pAdmin] >= 1)
          {
               GetPlayerName(i, pname, sizeof(pname));
               format(string, sizeof(string), "%s - %d", pname, PlayerInfo[i][pAdmin]);
          }
     }
     SendClientMessage(playerid, 0xAAAAAA, string);
     return 1;
}
Reply
#7

First of all, you will need a register/login system! Here is a nice tutorial Click Click!

And Then:

pawn Код:
CMD:admins(playerid, params[])
{
    new count = 0, string[256];
    for(new i = 0; i < MAX_PLAYERS; i ++)
    {
    if(IsPlayerConnected(i))
    {
    if(PlayerInfo[i][pAdmin] == 1)
    {
    format(string, sizeof(string),"- %s%s | (ID:%d) | Admin Level 1", string, GetName(i), i);
    count++;
    }
    if(PlayerInfo[i][pAdmin] == 2)
    {
    format(string, sizeof(string),"- %s%s | (ID:%d) | Admin Level 2", string, GetName(i), i);
    count++;
    }
    if(PlayerInfo[i][pAdmin] == 3)
    {
    format(string, sizeof(string),"- %s%s | (ID:%d) | Admin Level 3", string, GetName(i), i);
    count++;
    }
    if(PlayerInfo[i][pAdmin] == 4)
    {
    format(string, sizeof(string),"- %s%s | (ID:%d) | Admin Level 4", string, GetName(i), i);
    count++;
    }
    if(PlayerInfo[i][pAdmin] == 5)
    {
    format(string, sizeof(string),"- %s%s | (ID:%d) | Admin Level 5", string, GetName(i), i);
    count++;
    }
    }
    }
    if(count == 0)
    {
    SendClientMessage(playerid, COLOR_GREEN, "");
    SendClientMessage(playerid, COLOR_GREEN, "|======== Online Admins =======|");
    SendClientMessage(playerid, COLOR_WHITE, "- No Admins Online at Time!");
    SendClientMessage(playerid, COLOR_GREEN, "|==============================|");
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREEN, "");
    SendClientMessage(playerid, COLOR_GREEN, "|======== Online Admins =======|");
    SendClientMessage(playerid, COLOR_WHITE, string);
    SendClientMessage(playerid, COLOR_GREEN, "|==============================|");
    }
    return 1;
}
You will need ZCMD for that!
Reply
#8

Thank you Areax, But I am finding these Errors:

PHP код:
E:\SCRIPT\gamemodes\Gamemode.pwn(678) : error 028invalid subscript (not an array or too many subscripts): "PlayerInfo"
E:\SCRIPT\gamemodes\Gamemode.pwn(678) : warning 215expression has no effect
E
:\SCRIPT\gamemodes\Gamemode.pwn(678) : error 001expected token";"but found "]"
E:\SCRIPT\gamemodes\Gamemode.pwn(678) : error 029invalid expressionassumed zero
E
:\SCRIPT\gamemodes\Gamemode.pwn(678) : fatal error 107too many error messages on one line

Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase


4 Errors

Reply
#9

And 678 is this Line:

PHP код:
if(PlayerInfo[i][pAdmin] == 1
Reply
#10

pawn Код:
CMD:admins( playerid, params[ ] )
{
    new
        count,
        string[ 256 ]
    ;
    for( new i = 0; i < MAX_PLAYERS; i++ )
    {
        if( !IsPlayerConnected( i ) ) continue;
        if( PlayerInfo[ i ][ pAdmin ] > 0 )
        {
            new
                temp[ 64 ],
                name_[ MAX_PLAYER_NAME ]
            ;
            GetPlayerName( i, name_, MAX_PLAYER_NAME );
            format( temp, sizeof( temp ), "%s(%d) - Admin Level %d\n", name_, i, PlayerInfo[ i ][ pAdmin ] );
            strcat( string, temp );
            count++;
        }
    }
    if(count == 0) SendClientMessage( playerid, 0xFF0000FF, "No Admins Online" );
    else ShowPlayerDialog( playerid, 365, DIALOG_STYLE_MSGBOX, "Admin List", string, "Close", "" );
    return 1;
}
Replace:
pawn Код:
PlayerInfo[i][pAdmin]
to what you use for the admin level.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)