02.01.2014, 07:23
Hey guys I have a fire system ( https://sampforum.blast.hk/showthread.php?tid=226953 ) and I tried to do that the fire will Extiguishing itself by timer and I did like that but it doesn't work:
Can someone track the problem..?
pawn Код:
new firec;
new fire1;
new fire2;
new fire3;
SetTimer("DestroyFireTimer", 70000, 1);
fire1 = CreateFire(RandomSpawn[rand][0], RandomSpawn[rand][1], RandomSpawn[rand][2]);
fire2 = CreateFire(RandomSpawn[rand][0]-2, RandomSpawn[rand][1], RandomSpawn[rand][2]+3);
fire3 = CreateFire(RandomSpawn[rand][0]+3, RandomSpawn[rand][1], RandomSpawn[rand][2]+5);
forward DestroyFireTimer(id);
public DestroyFireTimer(id)
{
DestroyObject(Flame[id][Flame_id]);
Flame[id][Flame_Exists] = 0;
Flame[id][Flame_pos][0] = 0.0;
Flame[id][Flame_pos][1] = 0.0;
Flame[id][Flame_pos][2] = 0.0;
DestroyObject(fire1);
DestroyObject(fire2);
DestroyObject(fire3);
RemoveSmokeFromFire(id);
DestroyFire(id);
}