11.05.2009, 10:58
Ergh, this is exactly what the wiki is for - checking the function descriptions would have told you everything you need to know.
SetTimer() calls a function without specifiying the parameter values for that function. If there are any parameters for that function, they will all be set to 0.
SetTimerEx() calls a function the same way that SetTimer() does, but you can specify the values for the functions.
Here's an example:
I hope this clears it up for you - SetTimerEx() is for setting parameters, SetTimer() will set them to 0 for you if there are any, or if not, it won't use any.
SetTimer() calls a function without specifiying the parameter values for that function. If there are any parameters for that function, they will all be set to 0.
SetTimerEx() calls a function the same way that SetTimer() does, but you can specify the values for the functions.
Here's an example:
pawn Код:
public MyFunction(param1, Float:param2)
{
printf("%d, %.2f", param1, param2);
return 1;
}
//---------------------------------------
SetTimer("MyFunction", 1000, 0); // The output from MyFunction() with this method will be: 0, 0.00
SetTimerEx("MyFunction", 1000, 0, "df", 10, 17.85); // The output from MyFunction() with this method will be: 10, 17.85
//---------------------------------------
forward MyFunction(param1, Float:param2); // Just so nobody whinges >.>
~Cueball~

