# engineLoadDrawable (Client)

> Loads a drawable (`.kdr`) from a resource file so it can be given to a model.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Models
- **URL**: https://wiki.mymp.gg/en/engineLoadDrawable

## Syntax

```lua
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

```lua
local model = engineCreateModel("bench_blue", "object")
local drawable = engineLoadDrawable("models/bench_blue.kdr")
engineSetModelDrawable(model, drawable)
```

### Coming from MTA

Takes the place of MTA's `engineLoadDFF`. It reads the engine's `.kdr`, not a `.dff`.

## See also

- [engineSetModelDrawable (Client)](https://wiki.mymp.gg/en/engineSetModelDrawable.md): Makes a model draw a drawable loaded with engineLoadDrawable instead of its own.
- [engineLoadCol (Client)](https://wiki.mymp.gg/en/engineLoadCol.md): Loads a collision file (.kbn) from the resource so it can be given to a model.
- [engineCreateModel (Client)](https://wiki.mymp.gg/en/engineCreateModel.md): Makes a new model under a name, on this client only. It is used by its name, like any other model.
