engineSetElementOverlay
Client
Draws a material as an extra layer over the chosen materials of a single vehicle, ped or object.
bool engineSetElementOverlay(element element, int|string selector, material material [, int priority = 0, int order = 0])
Parameters
| Name | Type | Description |
|---|---|---|
| element | element | A vehicle, ped, player or object. |
| selector | int|string | Which material: its index from 1 or its name, as engineGetModelMaterials lists them. The name ignores case and takes the * and ? wildcards. |
| material | material | The material drawn on top. |
| priority | int | Breaks ties between layers of the same order: the higher priority is drawn later.default 0 |
| order | int | The 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 highlight = engineCreateMaterial("surface_emissive")
engineSetMaterialValue(highlight, "glowTint", tocolor(80, 160, 255))
local crate = createObject("trafficcone", 2490.0, -1670.0, 13.3)
engineSetElementOverlay(crate, "*", highlight)NoteAn element that is not a vehicle, ped, player or object is an error.