SixL client API / game/fire / GameFireMp

Interface: GameFireMp

Fires and explosions: stopping fires in an area and asking whether an explosion happened there.

Remarks

Positions are metres (x east, y north, z up). Explosion types are integers in the game's numbering.

Methods

getNumberOfFiresInRange()

getNumberOfFiresInRange(x, y, z, radius): Promise<number>

The number of fires within a sphere.

Parameters

x

number

Centre of the sphere, x in metres.

y

number

Centre of the sphere, y in metres.

z

number

Centre of the sphere, z in metres.

radius

number

Radius of the sphere, metres.

Returns

Promise<number>

A Promise of the count (an integer).

Example

const count = await mp.game.fire.getNumberOfFiresInRange(0, 0, 72, 15);

isExplosionActiveInArea()

isExplosionActiveInArea(type, x1, y1, z1, x2, y2, z2): Promise<boolean>

Tells whether an explosion of a type is still going on inside a box.

Parameters

type

number

The explosion type, an integer in the game's numbering.

x1

number

One corner of the box, x in metres.

y1

number

One corner of the box, y in metres.

z1

number

One corner of the box, z in metres.

x2

number

The opposite corner of the box, x in metres.

y2

number

The opposite corner of the box, y in metres.

z2

number

The opposite corner of the box, z in metres.

Returns

Promise<boolean>

A Promise of true while such an explosion is active in the box.

Example

const burning = await mp.game.fire.isExplosionActiveInArea(1, -10, -10, 70, 10, 10, 80);

isExplosionInArea()

isExplosionInArea(type, x1, y1, z1, x2, y2, z2): Promise<boolean>

Tells whether an explosion of a type happened inside a box.

Parameters

type

number

The explosion type, an integer in the game's numbering.

x1

number

One corner of the box, x in metres.

y1

number

One corner of the box, y in metres.

z1

number

One corner of the box, z in metres.

x2

number

The opposite corner of the box, x in metres.

y2

number

The opposite corner of the box, y in metres.

z2

number

The opposite corner of the box, z in metres.

Returns

Promise<boolean>

A Promise of true when such an explosion happened in the box.

Example

const hit = await mp.game.fire.isExplosionInArea(1, -10, -10, 70, 10, 10, 80);

isExplosionInSphere()

isExplosionInSphere(type, x, y, z, radius): Promise<boolean>

Tells whether an explosion of a type happened inside a sphere.

Parameters

type

number

The explosion type, an integer in the game's numbering.

x

number

Centre of the sphere, x in metres.

y

number

Centre of the sphere, y in metres.

z

number

Centre of the sphere, z in metres.

radius

number

Radius of the sphere, metres.

Returns

Promise<boolean>

A Promise of true when such an explosion happened in the sphere.

Example

const hit = await mp.game.fire.isExplosionInSphere(1, 0, 0, 72, 10);

removeScriptFire()

removeScriptFire(fireHandle): void

Removes a fire that the script started.

Parameters

fireHandle

number

The fire's handle.

Returns

void

Example

mp.game.fire.removeScriptFire(fireHandle);

stopFireInRange()

stopFireInRange(x, y, z, radius): void

Puts out the fires within a sphere.

Parameters

x

number

Centre of the sphere, x in metres.

y

number

Centre of the sphere, y in metres.

z

number

Centre of the sphere, z in metres.

radius

number

Radius of the sphere, metres.

Returns

void

Example

mp.game.fire.stopFireInRange(0, 0, 72, 15);

stopInRange()

stopInRange(x, y, z, radius): void

The same as GameFireMp.stopFireInRange.

Parameters

x

number

Centre of the sphere, x in metres.

y

number

Centre of the sphere, y in metres.

z

number

Centre of the sphere, z in metres.

radius

number

Radius of the sphere, metres.

Returns

void

Example

mp.game.fire.stopInRange(0, 0, 72, 15);