Skip to content
M2O Scripting APIScripting reference
Runtime classServer APIGenerated

SpikeStrip

Defined in: server/api.d.ts:1439

Replicated tyre spike strip that can be enabled or disabled by the server.

  • Entity

new SpikeStrip(id): SpikeStrip

Defined in: server/api.d.ts:1444

Creates a script wrapper for an existing spike strip with this ID; use SpikeStrip.create() to create one.

number

Network entity identifier.

SpikeStrip

destroy(): void

Defined in: server/api.d.ts:1470

Destroys this replicated spike strip.

void


setEnabled(enabled): void

Defined in: server/api.d.ts:1476

Sets whether this spike strip is active.

boolean

True to activate tyre puncturing; false to disable it.

void


setVirtualWorld(world): void

Defined in: shared.d.ts:83

number

void


setVisibleTo(player): void

Defined in: shared.d.ts:84

Entity | null

void


toString(): string

Defined in: server/api.d.ts:1465

Returns a readable representation of this spike strip.

string

The spike-strip ID formatted for logging or debugging.


static create(x, y, z, length?, heading?, virtualWorld?): SpikeStrip

Defined in: server/api.d.ts:1488

Creates and replicates an enabled tyre spike strip.

number

Initial world-space X coordinate.

number

Initial world-space Y coordinate.

number

Initial world-space Z coordinate.

number

Optional physical strip length in world units.

number

Optional world-space heading angle.

number

Optional virtual-world ID used for visibility filtering.

SpikeStrip

The newly created spike-strip handle.

readonly enabled: boolean

Defined in: server/api.d.ts:1459

Whether tyre puncturing is active.


readonly heading: number

Defined in: server/api.d.ts:1454

World-space heading angle.


readonly id: number

Defined in: shared.d.ts:79


readonly length: number

Defined in: server/api.d.ts:1449

Physical strip length in world units.


position: Vector3

Defined in: shared.d.ts:81


rotation: Vector3 | Quaternion

Defined in: shared.d.ts:82


readonly virtualWorld: number

Defined in: shared.d.ts:80