Posts: 512
Threads: 121
Joined: Sep 2013
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.