09.10.2017, 12:10
If you use SetTimerEx you could pass the location of the explosion to the function you're calling. Then after the explosion function is called, check if it's still within the 5-10 minutes (you could use timestamps, save the timestamp when the fire starts and then get a new timestamp to check the passed time in seconds). Then simply set the timer again.
SetTimerEx
Timestamps (gettime)
To get a timestamp. you can simply use:
No need to enter the hour, minute, second variables if you don't need them
Example of passing variables with SetTimerEx:
SetTimerEx
Timestamps (gettime)
To get a timestamp. you can simply use:
Код:
new stamp = gettime();
Example of passing variables with SetTimerEx:
PHP код:
SetTimerEx("SomeFunction", 1000, false, "isf", 10, "string value", 10.0);
forward SomeFunction(integerVariable, stringVariable[], Float:floatVariable);
public SomeFunction(integerVariable, stringVariable[], Float:floatVariable)
{
printf("Data: %d %s %f", integerVariable, stringVariable, floatVariable);
}