natives.ADD EXPLOSION: Difference between revisions

From GTA Connected
Jump to navigation Jump to search
(Created page with "{{ScriptItem |endpoint = client |games = vc |type = function |name = natives.ADD_EXPLOSION |parameters = Vec3 position, int type |parameter1 = Vec3 position World coordinates where the explosion occurs (x, y, z) |parameter2 = int type Explosion type (0–11) |usage = Create an explosion at a specific world position in Vice City |notes = Explosion type determines the visual and physical effect. Use carefully as explosions affect gameplay and nearby entities. |return1 = vo...")
 
(Add ScriptItem documentation from GTA VC SCM decompile)
Line 4: Line 4:
|type = function
|type = function
|name = natives.ADD_EXPLOSION
|name = natives.ADD_EXPLOSION
|parameters = Vec3 position, int type
|parameters = int type, Vec3 position
|parameter1 = Vec3 position World coordinates where the explosion occurs (x, y, z)
|parameter1 = int type Type identifier.
|parameter2 = int type Explosion type (0–11)
|parameter2 = Vec3 position World coordinates (x, y, z).
|usage = Create an explosion at a specific world position in Vice City
|usage = add explosion in Vice City
|notes = Explosion type determines the visual and physical effect. Use carefully as explosions affect gameplay and nearby entities.
|return1 = void
|return1 = void
|returnFail1 = void
|returnFail1 = void
|exampleJS = 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");
});
}}
}}

Revision as of 17:18, 13 June 2026

Function Client Only icon-vc.png Online and Offline

Available since Client 1.0.0
void natives.ADD_EXPLOSION(int type, Vec3 position)
The natives.ADD_EXPLOSION function is used to add explosion in Vice City.

Parameters

1) int type Type identifier.
2) Vec3 position World coordinates (x, y, z).

Return

void This function doesn't return a value.

Notes

There aren't any notes for this function.

Examples

There aren't any examples for this function.

Compatibility

There isn't any compatibility information for this function.