#1

Hello there people, i've searched everywhere but to no avail, I am unable to find how to make ranks.


Of course, i know

new GangRank;
new PoliceRank;

but...
What next?
Reply
#2

I made ex

pawn Код:
new GangRanks[MAX_PLAYERS];

stock GetPlayerRangInString(playerid)
{
    new str[20];
   
    switch(GangRanks[playerid])
    {
        case 0: "None";
        case 1: "Member";
        case 2: "Gangsta";
        case 3: "Leader";
    }
    return str;
}

stock GetPlayerRangInInt(playerid)return GangRanks[playerid];

stock SetPlayerGangRank(playerid, level)
{
    GangRanks[playerid] = level;
   
    new str[100];
    format(str, 100, "Your new Gang Level \"%s\"", GetPlayerRangInString(playerid));
    SendClientMessage(playerid, -1, str);
}
Reply
#3

ok so you got the first bit
this is a really simple way
pawn Код:
new GangRank[MAX_PLAYERS];
new PoliceRank[MAX_PLAYERS];
//[MAX_PLAYERS] so its for player each not global

//then when you want to set the players team just do
GangRank[playerid]=1;
//that would make the player have GangRank to 1
//and to check if the player is in that Rank you do
if(GangRank[playerid]==1){
//your code if the player is in that Rank
}
Reply
#4

Thank you people.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)