Names for admin levels? REP +1!!!
#1

Do anyone know how I can create a Text instead of "Level 1" ex.? Like when im kicking / slapping, then the admin ranks name will be showed?

Like if we say, level 1 is Trial Admin, and he is doing /kick

Example has been kicked by Trial Admin Example2 ?
Reply
#2

Something like this ?
pawn Код:
stock AdminLevelName(playerid)
{
    new
        szString[12]
    ;
    switch (adminvariable[playerid])
    {
        case 1: szString = "Trial admin";
        case 2: szString = "...";
        case 3: szString = "...";
        case 4: szString = "...";
        case 5: szString = "...";
    }
    return szString;
}
Reply
#3

Thanks, repping!
Reply
#4

You have a Roleplay server
Moderator
Admin
general admin
senior admin
Server owner
Just giving you names. Becuase someone already told you how to make names. do i still get a rep? :3
Reply
#5

Quote:
Originally Posted by Ponii
Посмотреть сообщение
You have a Roleplay server
Moderator
Admin
general admin
senior admin
Server owner
Just giving you names. Becuase someone already told you how to make names. do i still get a rep? :3
Don't beg
Reply
#6

But now I've a problem, it doesnt giving me the admin lvl name when im kicking?

PHP код:
 CMD:kick(playeridparams[])
{
    new 
idreason[128];
    if(
PInfo[playerid][Level] == 1) return SendClientMessage(playerid,COLOR_RED" You are not admin level 1.");
    else if(
sscanf(params"us"idreason))SendClientMessage(playeridCOLOR_WHITE"Usage: /kick [id/name][reason]");
    else {
        new 
Name[MAX_PLAYER_NAME], KickMessage[128];
        new 
Name2[MAX_PLAYER_NAME];
        new 
admlvl;
        
GetPlayerName(playeridNamesizeof(Name));
        
GetPlayerName(idName2sizeof(Name2));
        
format(KickMessagesizeof(KickMessage), "%s %s has kicked %s [reason: %s]",admlvlNameName2reason);
        
SendClientMessageToAll(COLOR_REDKickMessage);
        
Kick(id);
    }
    return 
1;

Reply
#7

Quote:
Originally Posted by Lynet
Посмотреть сообщение
But now I've a problem, it doesnt giving me the admin lvl name when im kicking?

PHP код:
 CMD:kick(playeridparams[])
{
    new 
idreason[128];
    if(
PInfo[playerid][Level] == 1) return SendClientMessage(playerid,COLOR_RED" You are not admin level 1.");
    else if(
sscanf(params"us"idreason))SendClientMessage(playeridCOLOR_WHITE"Usage: /kick [id/name][reason]");
    else {
        new 
Name[MAX_PLAYER_NAME], KickMessage[128];
        new 
Name2[MAX_PLAYER_NAME];
        new 
admlvl;
        
GetPlayerName(playeridNamesizeof(Name));
        
GetPlayerName(idName2sizeof(Name2));
        
format(KickMessagesizeof(KickMessage), "%s %s has kicked %s [reason: %s]",admlvlNameName2reason);
        
SendClientMessageToAll(COLOR_REDKickMessage);
        
Kick(id);
    }
    return 
1;

Here you go;
pawn Код:
stock AdminLevelName(playerid)
{
    new
        szString[12]
    ;
    switch (PInfo[playerid][Level])
    {
        case 1: szString = "Trial admin";
        case 2: szString = "...";
        case 3: szString = "...";
        case 4: szString = "...";
        case 5: szString = "...";
        default:  szString = "none";
    }
    return szString;
}



 CMD:kick(playerid, params[])
{
    new id, reason[128];
    if(PInfo[playerid][Level] == 1) return SendClientMessage(playerid,COLOR_RED, " You are not admin level 1.");
    else if(sscanf(params, "us", id, reason))SendClientMessage(playerid, COLOR_WHITE, "Usage: /kick [id/name][reason]");
    else {
        new Name[MAX_PLAYER_NAME], KickMessage[128];
        new Name2[MAX_PLAYER_NAME];
        GetPlayerName(playerid, Name, sizeof(Name));
        GetPlayerName(id, Name2, sizeof(Name2));
        format(KickMessage, sizeof(KickMessage), "%s %s has kicked %s [reason: %s]",AdminLevenName(playerid), Name, Name2, reason);
        SendClientMessageToAll(COLOR_RED, KickMessage);
        Kick(id);
    }
    return 1;
}
Reply
#8

Quote:
Originally Posted by FunnyBear
Посмотреть сообщение
Don't beg
how do i beg without saying please?

it was a question.
Reply
#9

Getting some errors now ;S


C:\Users\Skole\Desktop\Samp server\filterscripts\System.pwn(179) : error 047: array sizes do not match, or destination array is too small
C:\Users\Skole\Desktop\Samp server\filterscripts\System.pwn(180) : error 047: array sizes do not match, or destination array is too small
C:\Users\Skole\Desktop\Samp server\filterscripts\System.pwn(183) : error 047: array sizes do not match, or destination array is too small
C:\Users\Skole\Desktop\Samp server\filterscripts\System.pwn(186) : error 047: array sizes do not match, or destination array is too small

PHP код:
switch (PInfo[playerid][Level])
    {
        case 
1szString "Trial admin";
        case 
2szString "Low Admin";
        case 
3szString "Junior Admin";
        case 
4szString "Senior Admin";
        case 
5szString "Admin";
        case 
6szString "High Admin";
        case 
7szString "Expert Admin";
        case 
8szString "Head Admin";
        case 
9szString "Lead Admin";
        case 
10szString "Server Owner"
following lines which is errors on:

183
179
186
180

please help me :S
Reply
#10

fixed, just needed to set 12 to 64
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)