Admin Levels?
#10

Quote:
Originally Posted by Snipa
Посмотреть сообщение
pawn Код:
new AdminLevel[MAX_PLAYERS];


stock SetAdminLevel(playerid, level)
{
    switch(level)
    {
        case 1: AdminLevel[playerid] = 1;
        case 2: AdminLevel[playerid] = 2;
        case 3: AdminLevel[playerid] = 3;
        case 4: AdminLevel[playerid] = 4;
        case 5: AdminLevel[playerid] = 5;
    }
    return 1;
}
Like this?
Like i give above he wants something like Admin Ranks like in LuxAdmin or in other server.

QUOTE (Previous)

pawn Код:
new RankA[80]; //at the top of script

//at the stock function

switch(PlayerData[playerid][AdminLevel])
{
    case 1: RankA = "Trial Admin";
}
EDITED:

Example:

pawn Код:
new string[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string, 128, "%s: %s(%d) has kicked %s(%d)", AdminLevel(playerid), pName, playerid, targetname, targetid);
SendClientMessageToAll(-1, string);
AdminLevel(playerid) - Your stock function
pName - AdminName
playerid - your id
targetname - the one was being kicked (not mention in code)
targetid - the id of player who being kicked (not mention in code)

targetname and targetid is not in code so if you copy/paste it you will get a error
Reply


Messages In This Thread
Admin Levels? - by BleverCastard - 22.04.2012, 12:43
Re: Admin Levels? - by Richie© - 22.04.2012, 12:49
Re: Admin Levels? - by Cjgogo - 22.04.2012, 12:50
Re: Admin Levels? - by RollTi - 22.04.2012, 12:51
Re: Admin Levels? - by BleverCastard - 22.04.2012, 12:54
Re: Admin Levels? - by Snipa - 22.04.2012, 12:56
Re: Admin Levels? - by RollTi - 22.04.2012, 12:59
Re: Admin Levels? - by Snipa - 22.04.2012, 13:00
Re: Admin Levels? - by BleverCastard - 22.04.2012, 13:01
Re: Admin Levels? - by RollTi - 22.04.2012, 13:02

Forum Jump:


Users browsing this thread: 1 Guest(s)