Explosion to object
#4

Add this at the top of your script, anywhere under #include <a_samp>

pawn Код:
new object; // This is the object which will explode.
Next, we have to create the object and a timer. Add these under OnGameModeInit()

pawn Код:
object = CreateObject(1049,0,0,0,0,0,0); // Obviously, you'll have to change this to suit yourself.
SetTimer("Explosion",10000,1); // Creates a timer for the object to explode in 10 seconds, and repeats it.
Next, add this anywhere in your script under #include <a_samp> - Maybe at the bottom of the script.

pawn Код:
forward Explosion();
public Explosion()
{
    new Float:ObjX,Float:ObjY,Float:ObjZ;
    GetObjectPos(object,ObjX,ObjY,ObjZ); // Gets the position of the object.
    CreateExplosion(ObjX,ObjY,ObjZ,0,25.0); // Creates an explosion at the position we found.
    return 1;
}
Reply


Messages In This Thread
Explosion to object - by erdei18 - 25.07.2010, 12:37
Re: Explosion to object - by dice7 - 25.07.2010, 13:18
Re: Explosion to object - by erdei18 - 25.07.2010, 14:09
Re: Explosion to object - by Shadow™ - 25.07.2010, 14:21

Forum Jump:


Users browsing this thread: 1 Guest(s)