Wanted level
#1

Well, I'm using this function. But it still show me wanted level 8 and 12 , 14, blah , blah. I wanted if player has 6 stars wanted level and he robbed a player "(if you rob a player in my script you get 2 stars)". it should show to player
"Wanted level 6"

aS YOU CAN SEE IN PICTURE IT SHOWS ME Wanted Level 8 and it goes up if you rob something else. I want to make it stop at 6. Even if player has 6 stars already it should still show 6.



PHP код:
new WantedLevelStars[] = {
    
01122344556
};
stock CommitCrime(playeridlevelcrimedesc[]) {
    new 
string[128];
    
PlayerInfo[playerid][Wanted] = SetPlayerWanted(playeridPlayerInfo[playerid][Wanted] + level);
    
format(stringsizeof(string), "Committed a crime: %s (Wanted Level %d)"crimedesc);
    
SendClientMessage(playeridWHITEstring);
}
stock SetPlayerWanted(playeridlevel) {
    if (
level sizeof(WantedLevelStars)) level sizeof(WantedLevelStars);
    if (
level 0level 0;
    
PlayerInfo[playerid][Wanted] = level;
    
SetPlayerWantedLevel(playeridWantedLevelStars[level]);
    return 
level;

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)