[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
#2

Good job Lorenc
Reply
#3

simple and nice..most probably not gonna be used but still..
Reply
#4

aaaaaaaaaah Bob marley \o/ u deserver thousandZ of aplauds mate , good job Lorenc
Reply
#5

Oh, by the way. In the video the fireworks are a bit far away, I decreased it by 5 metres after uploading the video.

The missile is not showing because my camera is far away from it having it be not streamed.
Reply
#6

Interesting include Lorenc. But what if i try to do it without the streamer .. I don't think CreateFirework creates 50 objects ? :O
Reply
#7

Nice work. Now I'm gonna do a firework at your coords. :P
Reply
#8

Michael is right, some users don't use streamer, so I suggest to check if their gamemode/FS has included the streamer before otherwise it's gonna use "CreateObject".

P.S Good job and Merry X-Mass
Reply
#9

Ill use this.
Reply
#10

neons are nicer than explosions though :\
Reply
#11

Quote:
Originally Posted by Strawhats
Посмотреть сообщение
neons are nicer than explosions though :\
Exactly, however they are not synced, as stated.
Reply
#12

Very Nice Work !
Reply
#13

can you give me this download link not in pastebin
Reply
#14

Thanks for sharing,
You can improve that with neon objects I think it was cool!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)