natives.ADD EXPLOSION NO SOUND: Difference between revisions

Jump to navigation Jump to search
Add ScriptItem documentation from GTA VC SCM decompile
(Created page with "{{ScriptItem |endpoint = client |games = vc |type = function |name = natives.ADD_EXPLOSION_NO_SOUND |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 without sound |notes = Explosion type determines the visual and physical effect. This variant suppresses the explosion sound effect. |re...")
 
(Add ScriptItem documentation from GTA VC SCM decompile)
Line 4: Line 4:
|type = function
|type = function
|name = natives.ADD_EXPLOSION_NO_SOUND
|name = natives.ADD_EXPLOSION_NO_SOUND
|parameters = Vec3 position, int type
|parameters = int entity, Vec3 position
|parameter1 = Vec3 position World coordinates where the explosion occurs (x, y, z)
|parameter1 = int entity Entity handle.
|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 without sound
|usage = spawns a silent explosion effect at the specified position
|notes = Explosion type determines the visual and physical effect. This variant suppresses the explosion sound effect.
|return1 = void
|return1 = void
|returnFail1 = void
|returnFail1 = void
|exampleJS = addCommandHandler("expnosound", 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_NO_SOUND(new Vec3(-592.0, 670.0, 11.0), type);
    message("Silent explosion " + type + " at -592.0, 670.0, 11.0");
});
}}
}}
1,615

edits

Navigation menu