09.08.2012, 23:25
Hey guys,
Toady in this tutorial you will learn how to make your own custom fire script, now this is my first ever tutorial so I won't be that good at it. This is a tutorial on how to use the include from this link.
Okay lets start...
Make sure to put at the top of you filterscript the include, if you do not have this include you can get it from here.
Now to create a hand made one and not ones like in that include, so before we do anything make sure to add these codes to your OnGameModeInit() & OnPlayerUpdate(playerid).
OnGameModeInit
OnPlayerUpdate(playerid)
Now to create random fires we will use some timers for this so then you do not have to use commands, so first we need to forward the timer so insert this code some where in your script:
Now to make the timer, so put this code in the OnGamemodeInit, make sure to add this under the f_init():
Now to make the fire spawns (NOTE: this fire spawns infront of LSPD):
This is the code for the fire --> AddFire(Float:X, Float:Y, Float:Z, Firehealth);
And all that coding should look like this:
I hope this has helped you, and enjoy your fire script
Toady in this tutorial you will learn how to make your own custom fire script, now this is my first ever tutorial so I won't be that good at it. This is a tutorial on how to use the include from this link.
Okay lets start...
Make sure to put at the top of you filterscript the include, if you do not have this include you can get it from here.
Код:
#include <fire2>
OnGameModeInit
Код:
public OnGameModeInit() { f_init(); return 1; }
Код:
public OnPlayerUpdate(playerid) { f_OnPlayerUpdate(playerid); return 1; }
Код:
forward fire1();
Код:
SetTimer("fire1", 19200, false);
Код:
public fire1() { AddFire(1530.28, -1691.66, 12.97, 100); AddFire(1535.53, -1676.05, 12.97, 100); AddFire(1528.93, -1669.97, 12.97, 100); AddFire(1532.94, -1662.82, 12.97, 100); AddFire(1536.51, -1668.26, 12.97, 100); AddFire(1529.57, -1681.05, 12.97, 100); AddFire(1526.92, -1658.31, 12.97, 100); AddFire(1532.86, -1657.56, 12.97, 100); }
And all that coding should look like this:
Код:
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Fire script by calzo100 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include <a_samp> #include <fire2> #if defined FILTERSCRIPT forward fire1(); public OnFilterScriptInit() { print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); print(" Fire Script by calzo100 "); print(" Has loaded! "); print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); return 1; } public OnFilterScriptExit() { return 1; } #endif public OnGameModeInit() { // fire init f_init(); // Timers SetTimer("fire1", 19200, false); return 1; } public OnGameModeExit() { return 1; } public OnPlayerUpdate(playerid) { f_OnPlayerUpdate(playerid); return 1; } // All the fires public fire1() { AddFire(1530.28, -1691.66, 12.97, 100); AddFire(1535.53, -1676.05, 12.97, 100); AddFire(1528.93, -1669.97, 12.97, 100); AddFire(1532.94, -1662.82, 12.97, 100); AddFire(1536.51, -1668.26, 12.97, 100); AddFire(1529.57, -1681.05, 12.97, 100); AddFire(1526.92, -1658.31, 12.97, 100); AddFire(1532.86, -1657.56, 12.97, 100); }