Wanted Level 6
#5

Quote:
Originally Posted by BenzoAMG
Посмотреть сообщение
Well you'd have to set up a timer to do a check every so often, so lets say every 2 minutes.

pawn Код:
public OnGameModeInit() //Or OnFilterscriptInit for Filterscripts.
{
    SetTimer("WantedCheck", 120000, true);
    return 1;
}

forward WantedCheck();
public WantedCheck()
{
    new fstr[150];
    for(new i = 0; i < MAX_PLAYERS; i++) //foreach is a better option
    {
        if(IsPlayerConnected(i))
        {
            if(GetPlayerWantedLevel(i) >= 6)
            {
                new pname[MAX_PLAYER_NAME];
                GetPlayerName(i, pname, MAX_PLAYER_NAME);
                format(fstr, sizeof(fstr), "Player %s(%d) has a wanted level of 6. Kill them to get a bonus score!", pname, i);
                SendClientMessageToAll(0xFFFF00FF, fstr);
            }
        }
    }
    return 1;
}
Is there any option without the timer? coz I used to much timer. I would also like to ask, does using timer too much cost lag or heavy server?

And please can you add this?

Код:
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);
So player will know who killed that guy who had wanted level 6.

Thanks alot. And sorry if I took your time.
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)