- Documentation
- Client functions
- setElementPreviewTarget
Function
setElementPreviewTarget
Changes the preview target (an element, a model object or false = the scene).
Syntax
bool setElementPreviewTarget(preview preview, element|bool target)Arguments
previewpreview- The preview.
targetelement|bool- The new target.
Returns
true on success.
Example
setElementPreviewTarget(preview, localPlayer)
See also
createElementPreviewCreates a preview of an element (a vehicle, a player, a ped, an object, a model object) as an image fordxDrawImage, e.g. for a car shop or a wardrobe.falseas the target = the scene from the camera. By default the camera orbits the target so that it fits in the frame.setElementPreviewModelSets 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.