M MY Multiplayer: Wiki
Side
Kind

engineSetWorldOverlay

Client

Draws a material as an extra layer over the chosen materials of every model in the world.

bool engineSetWorldOverlay(int|string selector, material material [, string targets = world vehicle, int priority = 0, int order = 0])

Parameters

NameTypeDescription
selectorint|stringWhich material: its index from 1 or its name, as engineGetModelMaterials lists them. The name ignores case and takes the * and ? wildcards.
materialmaterialThe material drawn on top.
targetsstringWhich models it reaches: world, vehicle and ped, split by spaces or commas.default world vehicle
priorityintBreaks ties between layers of the same order: the higher priority is drawn later.default 0
orderintThe order among the layers of the same material, lowest first.default 0

Returns

true when it was applied.

Every layer that picks a material is drawn, by order and then by priority.

Example

local snow = engineCreateMaterial("surface_alpha")
engineSetWorldOverlay("*grass*", snow, "world", 0, 1)

See also