Wanted level system??
#1

Hi all,im searching a wanted level system.

Example: I kill 5 players and i get 1 star wanter,10 players 2 starts and ecc...
Reply
#2

On top:
pawn Код:
new playerskilled[MAX_PLAYERS];
Onplayerdeath
pawn Код:
playerskilled[killerid]++;

if(playerskilled[killerid] == 5)
{
SetPlayerWantedLevel(killerid, 1);
}
etc.
Reply
#3

Search. There are lots of examples in this forum already.
Reply
#4

Even simpler with the modulus operator:

pawn Код:
if((playerskilled[killerid] % 5) == 0)
{
    SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid)+1);
}
Notice: This can get past level 6 eventually.
It probably won't affect the player, and if it does you can simply make a check for it.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)