Skip to content

getModel2DFXCount

Client-side

Available in Neon, not standard MTA

Counts the 2DFX effects on a model.

Syntax

int|false getModel2DFXCount(int model [, bool includeCustom = true])

Arguments

modelint

Model ID from 0 through 65535.

includeCustombooloptional · default true

Whether resource-added effects are counted.

Returns

The effect count, or false for an invalid model.

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
  • Passing false counts only the model's original effects, which is how a resource finds a native effect index without tripping over its own additions.

Example

local nativeCount = getModel2DFXCount(1226, false)

Where this comes from

RELATED NEON APIS

Continue exploring

Read the system guide →