- Documentation
- Client functions
- setElementPreviewModel
Function
setElementPreviewModel
Sets a model preview without an element in the world (e.g. a list of cars or skins in a shop): the kind ("vehicle", "ped", "object") and the model number. The model only exists for this player, for the shots.
Syntax
bool setElementPreviewModel(preview preview, string kind, int model)Arguments
previewpreview- The preview.
kindstring"vehicle","ped"or"object".modelint- Model number.
Returns
true on success.
Example
A car shop: the preview changes when you click a model on the list.
local preview = createElementPreview(false, 400, 250)
local function showCar(model)
setElementPreviewModel(preview, "vehicle", model)
end
showCar(411)