natives.ADD_EXPLOSION

From GTA Connected
Jump to navigation Jump to search

Function Client Only icon-vc.png Online and Offline

Available since Client 1.0.0

void natives.ADD_EXPLOSION(Vec3 position, int type)

The natives.ADD_EXPLOSION function is used to Create an explosion at a specific world position in Vice City.

Parameters

1) Vec3 position World coordinates where the explosion occurs (x, y, z).
2) int type Explosion type (0–11).

Return

void This function doesn't return a value.

Notes

  • Explosion type determines the visual and physical effect. Use carefully as explosions affect gameplay and nearby entities.

Examples

Example 1 - JavaScript:

addCommandHandler("exp", function(cmd, args) {

   let type = 0;
   if (args && args.length > 0) {
       let n = parseInt(args[0]);
       if (!isNaN(n)) {
           type = n;
       }
   }
   if (type < 0) type = 0;
   if (type > 11) type = 11;
   natives.ADD_EXPLOSION(new Vec3(-592.0, 670.0, 11.0), type);
   message("Explosion " + type + " at -592.0, 670.0, 11.0");

});

Compatibility

There isn't any compatibility information for this function.