12.03.2015, 08:09
Yes, and i told you could create a 1-sec repeating timer to check if the player is in range of the object, and then do your special action.
Here's an example of setting the timer:
Here's an example of setting the timer:
pawn Код:
public OnGameModeInit()
{
SetTimer("MyTimer", 1000, true);
// "MyTimer" is the public function to call, etc. "public MyTimer()"
// 1000 is the time it takes for the timer to end in milliseconds - 1 second = 1000 milliseconds
// True/False if the timer should repeat or not
// Since we wanna continue checking if the player is in range of the object, it should be repeating (true)
}