admin system help
#1

1. how can i make a message witch will show what player has typed with the cmd "/" like in ladmin(lux)
2. how i make a message witch will show what other admin has typed?(like:when u type /kick it will show all admin then u have typed it like this:admin %s has used the command :: /kick)
3. how i make a name for admin level+show it when u type /admins+it will put ur lvl(number) on ur name+admin chat+minimum admin lvl to use a cmd


ik its long but i need this and idk how i make this....
big thx for helpers!
Reply
#2

1. ?? Can`t really understand the question.

2. Well, at everycommand, format a new string, something like:
pawn Код:
//command here, bla bla
foreach (Player,i)
{
     if(IsPlayerAdmin(i))
     {
          new String[ 128 ];
          format(String, sizeof String, "Admin %s used /kick command on player %s.", pName(playerid), pName(id));
          SendClientMessage(i, -1, String);
     }
}
NOTE: Don`t just copy the code, you must edit it with your informations.

3.
Create a new stock, like:
pawn Код:
stock GetPlayerLevelName(playerid)
{
    new Llevel[20];
    if (GetAdminLevel(playerid) == 0) Llevel = "Moderator";
    if (GetAdminLevel(playerid) == 1) Llevel = "GlobalModerator";
    if (GetAdminLevel(playerid) == 2) Llevel = "Administrator";
    if (GetAdminLevel(playerid) == 3) Llevel = "Senior Administrator";
    if (GetAdminLevel(playerid) == 4) Llevel = "Developer";
    if (GetAdminLevel(playerid) == 5) Llevel = "Owner";
    return Llevel;
}
And now, in a format, you can use:
pawn Код:
format(String, sizeof String, "Admin %s (%s) bla bla", pName(playerid), GetAdminLevel(playerid) );
Reply
#3

Every time a player will do "/[something here]" will be sent to all administrators, like "Player tiped /bla"

EDIT : Will this work?

pawn Код:
if (PVar[playerid][pLevel] == 1) Llevel = "Test Admin";
    if (PVar[playerid][pLevel] == 2) Llevel = "Moderator";
    if (PVar[playerid][pLevel] == 3) Llevel = "Administrator";
    if (PVar[playerid][pLevel] == 4) Llevel = "senior Administrator";
    if (PVar[playerid][pLevel] == 5) Llevel = "Developer";
    if (PVar[playerid][pLevel] == 6) Llevel = "Server Owner";
And what do i put in the format?
I got that PVar[playerid][plevel, pvip, pmuted, pjailed, etc...]
Reply
#4

ya what he saied!
Reply
#5

Quote:
Originally Posted by antonio112
Посмотреть сообщение
[/pawn]

And now, in a format, you can use:
pawn Код:
format(String, sizeof String, "Admin %s (%s) bla bla", pName(playerid), GetAdminLevel(playerid) );
can u tell me how i make when the player have saied somthing it will show on mainchat like thet:
Код:
"%s (%d) %s", name, id,what he saied....
"-[VIP]- %s (%d)(%s) %s", name, id, vip level, what he saied...
"-[ADMIN]- %s (%d)(Lv.%s) %s", name, id, admin level, what he saied...
Reply
#6

First off, start with a pName stock:
pawn Код:
stock pName(playerid)
{
    new Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Name, sizeof(Name));
    return Name;
}
This will get the players name from his ID:

Second,

OnPlayerText, put something like:
pawn Код:
public OnPlayerText( playerid, text[] )
{
    if(IsPlayerAdmin(playerid))
    {
        new String[ 128 ];
        format(String, sizeof String, "Player %s (%d) (%s): %s", pName(playerid), playerid, GetAdminLevel(playerid), text[0]);
        SendClientMessageToAll(-1, String);
     }
     return 1;    
}
Now, this'll work only for rcon admins (you can change it at anytime), it`ll format the text like you wanted.
For other players, it`ll be normal.

Not tested ... but I think it should work.
Reply
#7

k so how i make a cmd for lvl +1 or +4?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)