M MY Multiplayer: Wiki
Side
Kind

engineSetModelCol

Client

Makes a model collide with a collision loaded with engineLoadCol instead of its own.

bool engineSetModelCol(string|element model, element col [, int priority = 0])

Parameters

NameTypeDescription
modelstring|elementThe model's name, or a model element from engineCreateModel.
colelementA col element from engineLoadCol.
priorityintAmong several collisions given to the same model, the highest priority answers; among equals, the newest.default 0

Returns

true once it is set. Raises an error if no model has that name or the element is not a col.

Example

local model = engineCreateModel("bench_blue", "object")
local col = engineLoadCol("models/bench_blue.kbn")
engineSetModelCol(model, col)
Coming from MTATakes the place of MTA's engineReplaceCOL.

See also