[Include] "Firewerkz.inc" ─ Simple firework system.
#1

Introduction

Firewerkz is a doozy name for a firework system just brought up from the top of my head. The script is pretty basic, thus I will not make this thread fancy like my others.

I wasn't really in the mood to create anything but I had to because no great other firework system was available. Anyway, I decided to make one, it is very very basic and has two settings. Based on neon and explosions however, neon is not quite synced (with the colours)...

Functions

CreateFirework( Float: X, Float: Y, Float: Z, Float: speed = 9.0, Float: height = 30.0 )
  • X - The X axis.
  • Y - The Y axis.
  • Z - The Z axis.
  • speed - Speed of the rocket.
  • height - The height the rocket has to fly.
The include file can be configured easily, most of the configuration is based on definitions.

Example - DO NOT COPY AND PASTE, IT WILL MOST LIKELY NOT WORK!
pawn Код:
CMD:firework( playerid, params[ ] )
{
    new Float: X, Float: Y, Float: Z;
    GetPlayerPos( playerid, X, Y, Z );
   
    if( CreateFirework( X, Y, Z ) == -1 )
        SendError( playerid, "Couldn't create a firework due to an unexpected error." );
    else
        SendServerMessage( playerid, "Firework placed!" );
   
    return 1;
}
Preview

[ame]http://www.youtube.com/watch?v=Ez-UwAEYhlM[/ame]

May be processing, please wait!

Download

http://pastebin.com/xgSusxxv - v1.0

Have fun! Happy Holidays!

There are no bugs afaik, and I may not even bother to update this include. You may need to adjust the script to your liking. I tried to get most of the explosions in a circle so I used trigonometric functions, if you are wanting to ask why.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)