Skip to content

setModel2DFXProperty

Client-side

Available in Neon, not standard MTA

Changes one property of one effect, including on an effect GTA shipped.

Syntax

bool setModel2DFXProperty(int model, int index, string property, var value)

Arguments

modelint

Model ID from 0 through 65535.

indexint

Effect index on the model.

propertystring

Property name valid for that effect type.

valuevar

New value, matching that property's type.

Returns

true when applied; false for an invalid model, index, property or value.

Ownership and lifecycle

Custom effects belong to the resource that added them. Overrides and removals of original GTA effects are stacked per resource, so two resources editing the same model do not clobber each other, and stopping one rolls back only its own layer.

Important behavior
  • Overrides on original GTA effects are stacked per resource, so two resources editing the same model do not clobber each other.
  • This is the call the showcase uses for live colour waves, corona pulses and blink-mode changes.

Example

setModel2DFXProperty(1226, 0, "color", tocolor(255, 40, 40))

Where this comes from

RELATED NEON APIS

Continue exploring

Read the system guide →