Fire explosions
#1

Hi all i have a random fire code that i am trying to add an explosion timer onto but i cant figure out how to add it on and it work properly

Код:
case 0:
		{
			FireObject = CreateDynamicObject(18691, 1509.9354,-1668.4127,14.0469-3.0, 0, 0, 0.0); // 2, 2, 2 - X, Y, Z
			FireObject1 = CreateDynamicObject(18691, 1508.7214,-1671.8635,14.0469-3.0, 0, 0, 0.0); // 2, 2, 2 - X, Y, Z
			FireObject2 = CreateDynamicObject(18691, 1509.1333,-1665.4514,13.7969-3.0, 0, 0, 0.0); // 2, 2, 2 - X, Y, Z
			SmokeObject = CreateDynamicObject(18723, 1509.9354,-1668.4127,14.0469-3.0, 0, 0, 0.0); // 2, 2, 2 - X, Y, Z
			SmokeObject1 = CreateDynamicObject(18723, 1508.7214,-1671.8635,14.0469-3.0, 0, 0, 0.0); // 2, 2, 2 - X, Y, Z
			SmokeObject2 = CreateDynamicObject(18723, 1509.1333,-1665.4514,13.7969-3.0, 0, 0, 0.0); // 2, 2, 2 - X, Y, Z
			CreateExplosion(1509.9354,-1668.4127,14.0469, 0, 12.0);
			CreateExplosion(1508.7214,-1671.8635,14.0469, 0, 12.0);
			CreateExplosion(1509.1333,-1665.4514,13.7969, 0, 12.0);
			FireHealth = 250;
			format(string, sizeof(string), "{2641FE}Dispatch:{FFFFFF} A fire has broken out in your area, Check it out.");
			foreach(Player, i)
			{
				if(IsACop(i) || IsAGov(i) || IsALSEMS(i) || IsASWAT(i) || IsAHSF(i) || IsASATF(i))
				{
					SendClientMessage(i, COLOR_DEPTRADIO, string);
 				}
  			}
			format(string, sizeof(string), "{2641FE}Dispatch:{FFFFFF} We have sended you the GPS Location at your Mobile Device");
			foreach(Player, i)
			{
				if(IsACop(i) || IsAGov(i) || IsALSEMS(i) || IsASWAT(i) || IsAHSF(i) || IsASATF(i))
				{
					SendClientMessage(i, COLOR_DEPTRADIO, string);
					SetPlayerCheckpoint(i, 1509.9354,-1668.4127,14.0469, 1.0);
 				}
  			}
			KillTimer(FireTimer);
			FireText = Create3DTextLabel("250/250%", COLOR_GREEN, 1509.9354,-1668.4127,14.0469, 20.0, 0, 0);
			foreach(Player, i)
			{
				if(IsPlayerInRangeOfPoint(i, 25.0, 1767.1621,-1763.4482,13.5411))
    			{
			        format(string, sizeof(string), "* Fire alarms begins to rings and color sign became red *");
			        SendClientMessage(i, COLOR_ORANGE, string);
				}
			}
		}
This is what i have at the minute and what i want is to set it so that it explodes every 5 seconds for 5 minutes if someone could help me this would be much appreciated, Thanks
Reply
#2

you have no
PHP код:
SetTimer... 
also,show us the timer function.
Reply
#3

I have this one...

Код:
	
FireHealth = 0; // Los Santos EMS
FireTimer = SetTimer("StartRandomFire", 1200000, false); // Los Santos EMS
Reply
#4

show us the StartRandomFire function please.
Reply
#5

This is Scripting Help, not script for you.

The code you are showing has progressed (You posted this last week about how to get the random checkpoint), but it has no capability of having the timer been made, you're simply wanting someone to hand you code.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)