Creates a timer.
Code cpp:
VAULTSCRIPT vaultmp::Timer (*CreateTimer)(vaultmp::Function, vaultmp::Interval);
native CreateTimer(const func{}, interval);
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;
}
vaultmp::Void VAULTSCRIPT exec()
{
CreateTimer(&MyTimer, 5000);
}
Code c:
forward MyTimer();
public MyTimer()
{
// Timer function
return 0;
}
main()
{
CreateTimer("MyTimer", 5000);
}