- Documentation
- Client functions
- engineValidatePedModel
Function
engineValidatePedModel
Checks whether a model from a file (a ped .dff) works as a skin: bone weights, hierarchy and required bones. Returns the result and a report with errors and warnings, or false when the model has no skeleton (it will be static).
Syntax
bool, table engineValidatePedModel(mesh mesh)Arguments
meshmesh- The model.
Returns
The result and a { ok, bones, usedBones, errors, warnings } report.
Example
local ok, report = engineValidatePedModel(engineLoadMesh("skiny/bohater.dff"))
if report then
for _, e in ipairs(report.errors) do outputChatBox("Błąd: " .. e) end
end
See also
engineGetPedModelBonesReturns how the bones of a model from a file map to the game skeleton bones: a list of{ hid, bone, occurrence }. Game animations drive the model through these bones.engineReplaceModelReplaces the look of a model number: with an engine asset (engineLoadAsset) or a model from a file (engineLoadMesh). Objects, vehicles and peds (skins 0-312; a file model without a skeleton is static) with that number show the new model. An object without its own collision gets one from the.dffor from the model triangles;engineReplaceCOLgives a custom collision. It works for this player, so call it in a client script. Replacing a newengineRequestModelmodel that the game has not created yet (the player is just joining, a resource restart) waits for it; a model number that does not exist givesfalse.