Can somebody tell me how to create a rank system
#2

First of all, welcome to the forums

Second we dont need your gamemode ^^

Questions 1. Rank System:

You need to track the kills for that we create a global player array
pawn Код:
new gKills[MAX_PLAYERS];
and than we increase it for the player if he kills someone
pawn Код:
// OnPlayerDeath
    if(killerid != INVALID_PLAYER_ID) {
        gKills[killerid]++; // increases the variable by 1
    }
Question 2. Kills = Points:
pawn Код:
// OnPlayerDeath
    if(killerid != INVALID_PLAYER_ID) {
        gKills[killerid]++;
        SetPlayerScore(killerid, gKills[killerid]); // sets the kills as score
    }
Question 3. Teams:

pawn Код:
// Whenever you choose your team
    new
        name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof name); // gets the name
    format(name, sizeof name, "[%s]%s", THE_TEAM_NAME, name); // adds the team name before
    SetPlayerName(playerid, name); // sets the name again
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)