Fire System with timer
#1

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.
Reply
#2

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

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.
Reply
#4

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


Forum Jump:


Users browsing this thread: 1 Guest(s)