[Tutorial] How to make admin Rank.
#1

Hi in this tutorial i show you how to make rank for admin.
Go to "public OnPlayerConnect(playerid)" and write this:
PHP код:
PlayerInfo[playerid][AdminLevel] = 0;
stock AdminRank(targetid)
{
        new 
adminrank[10];
        switch(
PlayerInfo[targetid][pAdmin])
       {
          case 
0: { adminrank "None"; }
          case 
1: { adminrank "Moderator"; }
          case 
2: { adminrank "Junior"; }
          case 
3: { adminrank "Senior";}
       }
       return 
adminrank;

[/PHP]
This is a short tutorial how to make admin rank.
Sorry for my bad english
Reply
#2

This is not a tutorial? If i didn't know this, i learned nothing... Explain each function, each sentence!
Reply
#3

Besides, I think an array might be more effective.
pawn Код:
static const gAdminRanks[][] = {
    "None", // 0
    "Moderator", // 1
    "Junior", // 2
    "Senior" // 3
};

format(msg, sizeof(msg), "Player %d's admin level is: %s", targetid, gAdminRanks[PlayerInfo[targetid][pAdmin]]);
Reply
#4

or or, wait for it.. y_groups!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)