SA-MP Forums Archive
Fire System with timer - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Fire System with timer (/showthread.php?tid=359357)



Fire System with timer - Frosty_LV - 13.07.2012

Hello, there!

I was trying to make a fire system, like fire spawns at random buildings, and then firemens go and take the fire down. I tryed to use timer and createobject, but I guess I wen't in to wrong way with whole script. Can someone put me on the right road?



PHP код:
public OnGameModeInit()
{
if 
SetTimer(CreateObject103) *then
}
CreateObject(18688,-2230.0083,-2485.2417,35.42680000.0); 
I guess, this is gonna sound soooo wrong.


Re: Fire System with timer - Elysian` - 13.07.2012

No, no, no.
pawn Код:
SetTimer("Timer", 300000, true); // Gamemodeinit.
pawn Код:
forward Timer(); // At the end of your gamemode.
public Timer()
{
    CreateObject(....)
    return 1;
}



Re: Fire System with timer - Frosty_LV - 13.07.2012

Oh, so to change fire locations, I just need to make SetTimer(''bla bla bla'', etc.)
and then again forward ''bla bla bla''
public ''bla bla bla'' and
createobject coordinates and that shit?

EDIT:

Wierd, fire didn't appear. Compiled and ran without errors or warnings, but IG nothing happens.


Re: Fire System with timer - Elysian` - 13.07.2012

The timer is set to something like every 5 minutes, are you sure your creating the right object?