Creates a timer.
<code cpp>
VAULTSCRIPT vaultmp::Timer (*CreateTimer)(vaultmp::Function, vaultmp::Interval);
native CreateTimer(const func{}, interval);
</code>
vaultmp::Function (C++ only) - the function of the timer
func (PAWN only) - the name of the timer's function
vaultmp::Interval - the timer interval in milliseconds
Returns a
vaultmp::Timer referring to the newly created timer.
<code cpp>
vaultmp::Result VAULTSCRIPT MyTimer()
{
// Timer function
return 0;
}
void VAULTSCRIPT exec()
{
CreateTimer(&MyTimer, 5000);
}
</code>
<code c>
forward MyTimer();
public MyTimer()
{
// Timer function
return 0;
}
main()
{
CreateTimer("MyTimer", 5000);
}
</code>