[HELP] Random Explosions
#1

Does anyone know of a random explosion script? Like for a RP server to have random explosions for the fire department to go to. I know someone released one at one time but I cant find it by searching I've looked for over an hour.
Reply
#2

Here, my mate made this.

https://sampforum.blast.hk/showthread.php?tid=392811
Reply
#3

I already have 1 code the explosion but it does not in my opinion
Код:
public OnFilterScriptInit()
{
	SetTimer("OnBurgerExplosion", 3600000, true);
	return 1;
}

new Float:RandomSpawns[][] =
{
    {1249.7258, -2047.9263, 59.9209}, // 
    {1241.2084, -2057.6521, 60.0190}, // 
    {1241.0105, -2052.6873, 59.9975}, // 
    {718.4906, -1477.3024, 5.4688}, // 
    {722.3772, -1477.2856, 5.4688} // 
};



forward OnBurgerExplosion(playerid); // You can name this whatever you feel.
public OnBurgerExplosion(playerid)
{
    static explode2; // Defining the explode
    if(explode2 == 0)
	{
		new string[256];
        format(string, sizeof(string), "Co mot vu no vua xay ra, hay den do ngay.");
		SendRadioMessage(4, TEAM_MED_COLOR, string);
    }
    explode2++; // Every explosion, this will go up
    if(explode2 < 100) // once it explodes 100 times, it will disable itself
        SetTimer("OnBurgerExplosion", 3000, false); // This makes it disable itself
    else
        explode2 = 0; // If this is 0, it will start exploding, because fo the timer
    new bomb= random(sizeof(RandomSpawns));
    CreateExplosion(RandomSpawns[bomb][0],RandomSpawns[bomb][1],RandomSpawns[bomb][2], 2, 50.0); // explosions
    CreateExplosion(RandomSpawns[bomb][0],RandomSpawns[bomb][1],RandomSpawns[bomb][2], 2, 50.0); // explosions
    SetPlayerCheckpoint(playerid,RandomSpawns[bomb][0],RandomSpawns[bomb][1],RandomSpawns[bomb][2], 4.0);
    // X, Y, Z == X = X Coordinates, Y = Y Coordinates, Z = Z Coordinates
    return 1;
}
When it exploded, the checkpoint position on the map is not available with explosion...
Please help me! I want to script mode Roleplay of me
Reply
#4

please help....bro
Reply
#5

ok see this is what i use lol
x,y,z where you wanna create explosion
CreateExplosion(x,y,z,7,10.0);
Reply
#6

http://forum.sa-mp.com/showthread.ph...wpost&t=392811
Reply
#7

but i want random explosion for faction LAFD...
Reply
#8

Just create this: (An err.. 'Collection' of random locations you can record using /save ingame')
pawn Код:
new Float:RandomSpawns[][] =
{
    {1249.7258, -2047.9263, 59.9209}, //
    {1241.2084, -2057.6521, 60.0190}, //
    {1241.0105, -2052.6873, 59.9975}, //
    {718.4906, -1477.3024, 5.4688}, //
    {722.3772, -1477.2856, 5.4688} //
};
pawn Код:
CreateExplosion(RandomSpawns[random(sizeof(RandomSpawns))][0], RandomSpawns[random(sizeof(RandomSpawns))][1], RandomSpawns[random(sizeof(RandomSpawns))][2] //creates random explosions at one of the points.
Then you can 'CreateDynamicCP'..
Reply
#9

CreateDynamicCP?
where to put on?
Reply
#10

if me create
Код:
CreateExplosion(RandomSpawns[random(sizeof(RandomSpawns))][0], RandomSpawns[random(sizeof(RandomSpawns))][1], RandomSpawns[random(sizeof(RandomSpawns))][2] //creates random explosions at one of the points.
it will finished when me go to....sorry for bad english!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)