Creates a timer with an argument list.
Code cpp:
VAULTSCRIPT vaultmp::Timer (*CreateTimerEx)(vaultmp::Function, vaultmp::Interval, vaultmp::String, ...);
native CreateTimerEx(const func{}, interval, const def{}, {Fixed,Float,_}:...);
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
def - the parameter list of the function. This is a string containing a sequence of:
- i - Integer (4 byte)
- l - Long integer (8 byte)
- f - Floating-point (8 byte)
- p - Pointer (4 byte)
- s - String (const char*)
... - the arguments. Must match the previously defined definition.
Returns a
vaultmp::Timer referring to the newly created timer.
Code cpp:
vaultmp::Result VAULTSCRIPT MyTimer(unsigned int a, unsigned int b, const char* c)
{
// Timer function
return 0;
}
vaultmp::Void VAULTSCRIPT exec()
{
CreateTimerEx(reinterpret_cast<Function>(&MyTimer), 5000, "iis", 1, 2, "www.vaultmp.com");
}
Code c:
forward MyTimer(a, b, const c{});
public MyTimer(a, b, const c{})
{
// Timer function
return 0;
}
main()
{
CreateTimerEx("MyTimer", 5000, "iis", 1, 2, "www.vaultmp.com");
}