How to make maxium wanted level
#8

I personally do it a different way. Assuming your wanted levels correspond to the stars like so;
Код:
*     *     *     *     *     *
1 2   3 4   5     6 7   8 9   10
we would write something like this:

pawn Код:
new WantedLevelStars[] = {
    0, 1, 1, 2, 2, 3, 4, 4, 5, 5, 6
};

stock CommitCrime(playerid, level, crimedesc[]) {
    new string[128];
    PlayerInfo[playerid][Wanted] = SetPlayerWanted(playerid, PlayerInfo[playerid][Wanted] + level);
    format(string, sizeof(string), "Committed a crime: %s (Wanted Level %d)", crimedesc);
    SendClientMessage(playerid, WHITE, string);
}

stock SetPlayerWanted(playerid, level) {
    if (level > sizeof(WantedLevelStars)) level = sizeof(WantedLevelStars);
    if (level < 0) level = 0;
    PlayerInfo[playerid][Wanted] = level;
    SetPlayerWantedLevel(playerid, WantedLevelStars[level]);
    return level;
}
@jot16: go make your own damn thread.
Reply


Messages In This Thread
How to make maxium wanted level - by grand.Theft.Otto - 02.08.2011, 03:05
Re: How to make maxium wanted level - by (SF)Noobanatior - 02.08.2011, 03:07
Re: How to make maxium wanted level - by jot16 - 02.08.2011, 03:11
Re: How to make maxium wanted level - by PGTips - 02.08.2011, 03:15
Re: How to make maxium wanted level - by jot16 - 02.08.2011, 03:18
Re: How to make maxium wanted level - by PGTips - 02.08.2011, 03:21
Re: How to make maxium wanted level - by jot16 - 02.08.2011, 03:24
Re: How to make maxium wanted level - by Blacklite - 02.08.2011, 03:26
Re: How to make maxium wanted level - by PGTips - 02.08.2011, 03:29
Re: How to make maxium wanted level - by grand.Theft.Otto - 02.08.2011, 17:33

Forum Jump:


Users browsing this thread: 1 Guest(s)