engineGetModels
Client
Lists the models this client knows, with where each comes from.
table engineGetModels([string kind = nil])
Parameters
| Name | Type | Description |
|---|---|---|
| kind | string | Only models of this kind: object, vehicle, ped or weapon. Without it, every model.default nil |
Returns
A table keyed by model name. Each value has origin ("engine" or "content"), owner (the pack or resource that brought it), kind, drawable (who gives the drawable it draws) and, for a model made with engineCreateModel from a parent, parent. Raises an error if kind is unknown.
Example
for name, info in pairs(engineGetModels("vehicle")) do
if info.parent then
print(name .. " is based on " .. info.parent)
end
end