engineLoadDrawable
Client
Loads a drawable (.kdr) from a resource file so it can be given to a model.
element engineLoadDrawable(string path)
Parameters
| Name | Type | Description |
|---|---|---|
| path | string | Path to the .kdr file in the resource. |
Returns
A drawable element. Raises an error if the file cannot be found or read.
Destroying the element drops the file, and with it the models it was given to go back to what they drew before.
Example
local model = engineCreateModel("bench_blue", "object")
local drawable = engineLoadDrawable("models/bench_blue.kdr")
engineSetModelDrawable(model, drawable)Coming from MTATakes the place of MTA's
engineLoadDFF. It reads the engine's .kdr, not a .dff.