M MY Multiplayer: Wiki
Side
Kind

engineSetWorldTexture

Client

Swaps a texture on every model of the chosen kinds that uses it. Only the models' materials change, not the txd the texture comes from.

bool engineSetWorldTexture(string name, texture|dui|bool source [, string targets = "world vehicle", int priority = 0])

Parameters

NameTypeDescription
namestringThe texture name, or a glob pattern, matched against every model's texture names.
sourcetexture|dui|boolA texture, a dui, or false to hide the texture.
targetsstringWhich models: world, vehicle and ped, separated by spaces or commas.default "world vehicle"
priorityintAmong several swaps for the same texture, the highest priority answers; among equals, the newest.default 0

Returns

true once the swap is set. Raises an error if the source is not an image or false, or if a target is unknown.

The world's swaps answer under a model's (engineSetModelTexture) and an element's (engineSetElementTexture).

Example

engineSetWorldTexture("*graffiti*", false, "world")

See also