Create explosion loop

Hi I have a system to do fires for fire faction but can someone tell me how I can make it so when a random fire starts it will keep exploding until it runs out of time?

Create explosion then wait a few seconds then another explosion in same place then wait and keep doing that for maybe 5-10 minutes

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.

Timestamps (gettime)

To get a timestamp. you can simply use:
new stamp = gettime();
No need to enter the hour, minute, second variables if you don't need them

Example of passing variables with SetTimerEx:
PHP код:
SetTimerEx("SomeFunction"1000false"isf"10"string value"10.0);
forward SomeFunction(integerVariablestringVariable[], Float:floatVariable);
SomeFunction(integerVariablestringVariable[], Float:floatVariable)
printf("Data: %d %s %f"integerVariablestringVariablefloatVariable);


Forum Jump:

Users browsing this thread: 1 Guest(s)