Creating explosions
#1

Hello, I am kinda new to this, so bear with me here.

I was trying to make an explosion command:

pawn Код:
if (strcmp(cmd, "/boom", true) == 0)
    {
        CreateExplosion(268.99725342,1883.84851074,-25.94452477, 1, 10.0); //object(binnt07_la) (1)
        CreateExplosion(268.99707031,1883.84765625,-23.94452477, 1, 10.0); //object(binnt07_la) (2)
        CreateExplosion(268.99707031,1883.84765625,-21.69452477, 1, 10.0); //object(binnt07_la) (3            CreateExplosion(268.99707031,1883.84765625,-19.19452477, 1, 10.0); //object(binnt07_la) (4)
        CreateExplosion(268.99707031,1883.84765625,-16.69452477, 1, 10.0); //object(binnt07_la) (5)
        CreateExplosion(268.99707031,1883.84765625,-13.94452477, 1, 10.0); //object(binnt07_la) (6)
        CreateExplosion(268.99707031,1883.84765625,-10.69452477, 1, 10.0); //object(binnt07_la) (7)
        CreateExplosion(268.99707031,1883.84765625,-7.94452477, 1, 10.0); //object(binnt07_la) (8)
        CreateExplosion(268.99707031,1883.84765625,-4.94452477, 1, 10.0); //object(binnt07_la) (9)
        CreateExplosion(268.99707031,1883.84765625,-2.19452477, 1, 10.0); //object(binnt07_la) (10)
        CreateExplosion(268.99707031,1883.84765625,0.80547523, 1, 10.0);//object(binnt07_la) (11)
        CreateExplosion(268.99707031,1883.84765625,3.55547523, 1, 10.0); //object(binnt07_la) (12)
        CreateExplosion(268.99707031,1883.84765625,6.80547523, 1, 10.0); //object(binnt07_la) (13)
        CreateExplosion(268.99707031,1883.84765625,10.55547523, 1, 10.0); //object(binnt07_la) (14)
        CreateExplosion(268.99707031,1883.84765625,19.80547523, 1, 10.0); //object(binnt07_la) (15)
        CreateExplosion(268.99707031,1883.84765625,19.80547523, 1, 10.0); //object(binnt07_la) (16)
        }
        return 1;
    }
But PAWN program shuts down so there is something seriously wrong there, maybe this cant be done? Can someone please show me how to do this right, I would really appreciate it! Also, adding luxadmin to this command so only I can use it, like this:

pawn Код:
if(IsPlayerLuxAdminLevel(playerid, 10))
Thanks in advance!
Reply
#2

try it:
pawn Код:
if (strcmp(cmd, "/boom", true) == 0)
    {
        CreateExplosion(268.99725342,1883.84851074,-25.94452477, 1, 10.0); //object(binnt07_la) (1)
        CreateExplosion(268.99707031,1883.84765625,-23.94452477, 1, 10.0); //object(binnt07_la) (2)
        CreateExplosion(268.99707031,1883.84765625,-21.69452477, 1, 10.0); //object(binnt07_la) (3            CreateExplosion(268.99707031,1883.84765625,-19.19452477, 1, 10.0); //object(binnt07_la) (4)
        CreateExplosion(268.99707031,1883.84765625,-16.69452477, 1, 10.0); //object(binnt07_la) (5)
        CreateExplosion(268.99707031,1883.84765625,-13.94452477, 1, 10.0); //object(binnt07_la) (6)
        CreateExplosion(268.99707031,1883.84765625,-10.69452477, 1, 10.0); //object(binnt07_la) (7)
        CreateExplosion(268.99707031,1883.84765625,-7.94452477, 1, 10.0); //object(binnt07_la) (8)
        CreateExplosion(268.99707031,1883.84765625,-4.94452477, 1, 10.0); //object(binnt07_la) (9)
        CreateExplosion(268.99707031,1883.84765625,-2.19452477, 1, 10.0); //object(binnt07_la) (10)
        CreateExplosion(268.99707031,1883.84765625,0.80547523, 1, 10.0);//object(binnt07_la) (11)
        CreateExplosion(268.99707031,1883.84765625,3.55547523, 1, 10.0); //object(binnt07_la) (12)
        CreateExplosion(268.99707031,1883.84765625,6.80547523, 1, 10.0); //object(binnt07_la) (13)
        CreateExplosion(268.99707031,1883.84765625,10.55547523, 1, 10.0); //object(binnt07_la) (14)
        CreateExplosion(268.99707031,1883.84765625,19.80547523, 1, 10.0); //object(binnt07_la) (15)
        CreateExplosion(268.99707031,1883.84765625,19.80547523, 1, 10.0); //object(binnt07_la) (16)
        return 1;
    }
Reply
#3

pawn Код:
// Top of the script:

#include <ladmin>

// The command

    if (strcmp(cmdtext, "/boom", true) == 0)
    {
        if(IsPlayerLuxAdminLevel(playerid, 10))
        {
            CreateExplosion(268.99725342,1883.84851074,-25.94452477, 1, 10.0); //object(binnt07_la) (1)
            CreateExplosion(268.99707031,1883.84765625,-23.94452477, 1, 10.0); //object(binnt07_la) (2)
            CreateExplosion(268.99707031,1883.84765625,-21.69452477, 1, 10.0); //object(binnt07_la) (3)
            CreateExplosion(268.99707031,1883.84765625,-19.19452477, 1, 10.0); //object(binnt07_la) (4)
            CreateExplosion(268.99707031,1883.84765625,-16.69452477, 1, 10.0); //object(binnt07_la) (5)
            CreateExplosion(268.99707031,1883.84765625,-13.94452477, 1, 10.0); //object(binnt07_la) (6)
            CreateExplosion(268.99707031,1883.84765625,-10.69452477, 1, 10.0); //object(binnt07_la) (7)
            CreateExplosion(268.99707031,1883.84765625,-7.94452477, 1, 10.0); //object(binnt07_la) (8)
            CreateExplosion(268.99707031,1883.84765625,-4.94452477, 1, 10.0); //object(binnt07_la) (9)
            CreateExplosion(268.99707031,1883.84765625,-2.19452477, 1, 10.0); //object(binnt07_la) (10)
            CreateExplosion(268.99707031,1883.84765625,0.80547523, 1, 10.0);//object(binnt07_la) (11)
            CreateExplosion(268.99707031,1883.84765625,3.55547523, 1, 10.0); //object(binnt07_la) (12)
            CreateExplosion(268.99707031,1883.84765625,6.80547523, 1, 10.0); //object(binnt07_la) (13)
            CreateExplosion(268.99707031,1883.84765625,10.55547523, 1, 10.0); //object(binnt07_la) (14)
            CreateExplosion(268.99707031,1883.84765625,19.80547523, 1, 10.0); //object(binnt07_la) (15)
            CreateExplosion(268.99707031,1883.84765625,19.80547523, 1, 10.0); //object(binnt07_la) (16)
        }
        return 1;
    }
Reply
#4

Ahh yes! My savior! But how to add luxadmin thingy? Is it just ifblablabla and { again below?
Reply
#5

Ahh didnt see u there Berlovan! Thank you all very much!
Reply
#6

Sorry for double posting, but what is this exactly?

pawn Код:
1, 10.0);
Reply
#7

Quote:
Originally Posted by Prometheus
Посмотреть сообщение
Sorry for double posting, but what is this exactly?

pawn Код:
1, 10.0);
1 is the type of explosion and 10.0 is the radius.

You can view This page for more information about it. Click Here
Reply
#8

Genius, thanks!
Reply
#9

Reputation please!

@ the guy under: You can do as you want.
Reply
#10

Quote:
Originally Posted by Berlovan
Посмотреть сообщение


Reputation pleasE!
You shouldn't ask for reputation. If they feel like giving some they will.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)