#1

Hello

Does anyone know how to make Trucking ranks that go by score please help
Reply
#2

Make a variable for the rank, then make a public callback that updates the rank, get the player score, and set a timer that calls that callback.
Reply
#3

can u show me an example
Reply
#4

pawn Код:
new Ranks[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    Ranks[playerid] = 0;
    return 1;
}


public OnPlayerDisconnect(playerid)
{
    Ranks[playerid] = 0;
    return 1;
}


public OnPlayerDeath(playerid, killerid, reason)
{
    if(GetPlayerScore(killerid) == 1) {
        SendClientMessage(killerid,-1,"SERVER: You just ranked up to 1 :D");
        Ranks[killerid] = 1;
    }
    return 1;
}


// now try to make something if player is rank 1

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/weaponrank1", cmdtext, true, 10) == 0) {
        if(Ranks[playerid] == 1) {
            GivePlayerWeapon(playerid,24,1000);
        }
        else {
            SendClientMessage(playerid,-1,"SERVER: You are not rank 1 :)");
        }
        return 1;
    }
    return 0;
}
Reply
#5

no like this

Red indicates rank

Trucker Wannabe is first rank

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)