CreateExplosion?
#1

Hey there,

Can I ask something? I want to create a filterscript for a server, NewYear firework show! I mean, the server is every time changing a map (other place). And is it possible to make something like ''CreateExplosion''? Because I'm on admin duty and using a command to give myself a heat seaker and just shooting in the air so it looks like firework. But is there something to create explosion in the air? Some flips in the air and explosion like firework? I've searched but couldn't find how to make it. But someone told me there would be a simple way like
pawn Код:
CreateExplosion; ()
Andy.
Reply
#2

Look THIS
Reply
#3

This is not really helping! Seriously, if you are so good at posting links, why don't you explain what wiki says?
Reply
#4

Here i made a code that makes explosions above you.

pawn Код:
#include <a_samp>
pawn Код:
forward FireWorks(playerid);
pawn Код:
new Float:X, Float:Y, Float:Z;
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/fireworks", true) == 0)
    {
       SetTimer("FireWorks", 1000, 1);
    return 1;
    }
    return 0;
}
pawn Код:
public FireWorks(playerid)
{
  GetPlayerPos(playerid, X,Y,Z);
  CreateExplosion(X,Y+5,Z+20, 0, 10);
  return 1;
}
Reply
#5

Quote:
Originally Posted by McKinley
This is not really helping! Seriously, if you are so good at posting links, why don't you explain what wiki says?
You don't need any explanation from anyone, just read the wiki-explosion-page.

@<Krys>: your code won't work, use SetTimerEx-function.
Reply
#6

Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by McKinley
This is not really helping! Seriously, if you are so good at posting links, why don't you explain what wiki says?
You don't need any explanation from anyone, just read the wiki-explosion-page.
I did, but everyone is just posting links, I bet they don't even know what the wiki says...

I'm trying everything but I keep getting 3 errors.
Reply
#7

http://forum.sa-mp.com/index.php?topic=137819.0
Reply
#8

Quote:
Originally Posted by McKinley
Quote:
Originally Posted by Don Correlli
Quote:
Originally Posted by McKinley
This is not really helping! Seriously, if you are so good at posting links, why don't you explain what wiki says?
You don't need any explanation from anyone, just read the wiki-explosion-page.
I did, but everyone is just posting links, I bet they don't even know what the wiki says...

I'm trying everything but I keep getting 3 errors.
Everyone is posting links, because wiki IS for helping. Is it so difficult to read the usage of CreateExplosion?
You put the 3co-ords(X-Y-Z) the type of the explosion(that is in the wiki too and explains the difference) and then the radius of the explosion. After reading that simple page you can start testing by yourself. Thats why im posting links. Also you said you wanted fireworks. If you search for fireworks, you will find at least 2 results(filterscripts)
Reply
#9

Quote:
Originally Posted by McKinley
I'm trying everything but I keep getting 3 errors.
Well, don't be afraid to post them. We're here to help you.
Reply
#10

What about this:

pawn Код:
new Float:pX, Float:pY, Float:pZ;
GetPlayerPos(playerid, pX, pY, pZ);

for(new Float:eZ=pZ+5; eZ<=pZ+110; eZ++)
{
if(eZ==pZ+99)
{
CreateExplosion(pX, pY, eZ, 5, 60);
}
else if(eZ>=nZ+99)
{
new Float:randomizer=floatadd(floatdiv(Float:random(10), Float:random(10)), floatdiv(Float:random(10), Float:random(10)));
CreateExplosion(nX+randomizer, nY+randomizer, eZ+randomizer, 5, 7);
}
else
{
CreateExplosion(pX, pY, eZ, 5, 4);
}
}
Untested, might cause laggs, etc... but i think it's the way you want it to look. If it causes too hard laggs, just decimate the numbers a bit, so there will not be that much explosions, or put all into a timer, so the time between the explosions is a little larger. Have Fun.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)