CreateDataTimer

Last Updated2009-03-01
Created At2007-03-14

Creates a timer associated with a new datapack, and returns the datapack.

Notes

The datapack is automatically freed when the timer ends.

The position of the datapack is not reset or changed for the timer function.

stock Handle CreateDataTimer(float interval, Timer func, Handle &datapack, int flags = 0)

Parameters

float interval
Interval from the current game time to execute the given function.
Timer func
Function to execute once the given interval has elapsed.
Handle& datapack
The newly created datapack is passed though this by-reference parameter to the timer callback function.
int flags
Timer flags.

Return Value

Handle Handle to the timer object. You do not need to call CloseHandle().