25.07.2010, 14:21
Add this at the top of your script, anywhere under #include <a_samp>
Next, we have to create the object and a timer. Add these under OnGameModeInit()
Next, add this anywhere in your script under #include <a_samp> - Maybe at the bottom of the script.
pawn Код:
new object; // This is the object which will explode.
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.
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;
}