M MY Multiplayer: Wiki
Side
Kind

engineRestoreModelCol

Client

Takes away the collision this resource gave a model with engineSetModelCol, so it collides as it did before.

bool engineRestoreModelCol(string|element model [, element col = nil])

Parameters

NameTypeDescription
modelstring|elementThe model's name, or a model element from engineCreateModel.
colelementOnly while the model's collision from this resource is this one.default nil

Returns

true if a collision was taken away, false if none matched. Raises an error if no model has that name.

Example

local model = engineCreateModel("bench_blue", "object")
local col = engineLoadCol("models/bench_blue.kbn")
engineSetModelCol(model, col)

addCommandHandler("stockbench", function()
    engineRestoreModelCol(model, col)
end)
Coming from MTATakes the place of MTA's engineRestoreCOL.

See also