30.11.2012, 13:11
run 2/3 second timer, no other option
e.g
the variables are so there is no loop when checking the timer
e.g
pawn Код:
//top of GM/FS
new UpdateTimer;
new InPos[MAX_PLAYERS];
//At gememodeint or filterscriptint
UpdateTimer = SetTimer("OnTimerUpdate", 3000, true);
//the callback
forward OnTimerUpdate();
public OnTimerUpdate{
for(new playerid = 0; playerid < MAX_PLAYERS; playerid ++)
{
if(IsPlayerInRangeOfPoint(playerid ,distance,x,y,z) && InPos[playerid]==0)
{
InPos[playerid]=1;
//do what ever if the player is in the x,y,z cords
}else{
InPos[playerid]=0;
}
}
return 1;
}