Another rank question
#5

Thats the whole code AND
this part only register a score when a player kills another, and i want it to get the score even if its a truck mission.
Running a trucking server.

(And i can complie it without errors, even run it in the server. But only counts kill score.)

Something with OnPlayerUpdate but can not figure it out
Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    new string[256];

    if(GetPlayerScore(killerid) == 1) // Amount of required kills to get rank 1 *Baby Killa'*
    {
        GetPlayerName(killerid, string, sizeof(string) );
        format(string, sizeof(string), ">> %s advanced to rank *Rookie Trucker*", string, GetPlayerScore(killerid) );
        SendClientMessageToAll(COLOR_LIGHTBLUE, string);
        pRank[playerid] = 1;
    }
    else if(GetPlayerScore(killerid) == 20) // Amount of required kills to get rank 2 *Soldier*
    {
        GetPlayerName(killerid, string, sizeof(string) );
        format(string, sizeof(string), ">> %s advanced to rank *Trucker*", string, GetPlayerScore(killerid));
        SendClientMessageToAll(COLOR_LIGHTBLUE, string);
        pRank[playerid] = 2;
    }
    else if(GetPlayerScore(killerid) == 100) // Amount of required kills to get rank 3 *Gangsta'*
    {
        GetPlayerName(killerid, string, sizeof(string) );
        format(string, sizeof(string), ">> %s advanced to rank *Respected Trucker*", string, GetPlayerScore(killerid));
        SendClientMessageToAll(COLOR_LIGHTBLUE, string);
        pRank[playerid] = 3;
    }
    else if(GetPlayerScore(killerid) == 250) // Amount of required kills to get rank 4 *Underboss*
    {
        GetPlayerName(killerid, string, sizeof(string) );
        format(string, sizeof(string), ">> %s advanced to rank *Trucker Of The Year*", string, GetPlayerScore(killerid));
        SendClientMessageToAll(COLOR_LIGHTBLUE, string);
        pRank[playerid] = 4;
    }
    else if(GetPlayerScore(killerid) == 500) // Amount of required kills to get rank 5 *Tha' Boss*
    {
        GetPlayerName(killerid, string, sizeof(string) );
        format(string, sizeof(string), ">> %s advanced to rank *Most Valued Trucker*", string, GetPlayerScore(killerid));
        SendClientMessageToAll(COLOR_LIGHTBLUE, string);
        pRank[playerid] = 5;
    }
    return 1;
}
Reply


Messages In This Thread
Another rank question - by $mooth - 01.08.2012, 15:15
Re: Another rank question - by $mooth - 01.08.2012, 15:44
Re: Another rank question - by $mooth - 01.08.2012, 16:40
Re: Another rank question - by Roko_foko - 01.08.2012, 16:55
Re: Another rank question - by $mooth - 01.08.2012, 17:33
Re: Another rank question - by Roko_foko - 01.08.2012, 17:52
Re: Another rank question - by $mooth - 01.08.2012, 18:38

Forum Jump:


Users browsing this thread: 1 Guest(s)