Wanted Level 6
#6

Oh crap lol, I forgot to add the SendClientMessageToAll xD

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID && killerid != playerid)
    {
        if(GetPlayerWantedLevel(playerid) >= 6)
        {
            SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
            new fstr[150], dname[MAX_PLAYER_NAME], kname[MAX_PLAYER_NAME];
            GetPlayerName(playerid, dname, MAX_PLAYER_NAME);
            GetPlayerName(killerid, kname, MAX_PLAYER_NAME);
            format(fstr, sizeof(fstr), "Player %s(%d) has killed %s(%d) with a wanted level of 6, and has claimed a bonus score!", kname, killerid, dname, playerid);
            SendClientMessageToAll(0xFFFF00FF, fstr);
            //SetPlayerWantedLevel(playerid, 0);
        }
    }
    return 1;
}
A 2 minute timer will not really effect your server at all, multiple 1 second timers can cause issues though, but this shouldn't be a problem. Another alternative would be to run this every time a player gets a wanted level of 6, meaning you would have to make a custom function for your SetPlayerWantedLevel functions that would also do a check along with it, and then announcing it.
Reply


Messages In This Thread
Wanted Level 6 - by gotwarzone - 22.10.2013, 15:36
Re: Wanted Level 6 - by Threshold - 22.10.2013, 15:41
Re: Wanted Level 6 - by gotwarzone - 22.10.2013, 15:54
Re: Wanted Level 6 - by Threshold - 22.10.2013, 16:10
Re: Wanted Level 6 - by gotwarzone - 22.10.2013, 16:18
Re: Wanted Level 6 - by Threshold - 22.10.2013, 16:23
Re: Wanted Level 6 - by gotwarzone - 22.10.2013, 16:37

Forum Jump:


Users browsing this thread: 1 Guest(s)