16.09.2011, 15:50
pawn Code:
new timer;
public OnGameModeInit() {
timer = SetTimer("CheckPlayer", 2000, true); // your timer, checks every 2 seconds
}
public OnGameModeExit() {
KillTimer(timer);
}
forward CheckPlayer();
public CheckPlayer() {
// For loop, you can also use "foreach" for this (include by Y_Less)
for(new i=0;i<MAX_PLAYERS;i++) {
if(IsPlayerInRangeOfPoint(i, 5.0, 321.1703,308.9879,999.1484) && Faction[i] == 1))
GameTextForPlayer(i, "~b~Police Health ~n~~w~ /health", 3000, 5);
}
}