Vehicle::setLiveryTexture

From RAGE Multiplayer Wiki
Revision as of 18:21, 23 April 2024 by Shr0x (talk | contribs) (Created page with "{{ClientsideJsFunction}} {{JSContainer| Set a custom texture livery to the given vehicle. === Required Params === *'''textureDict:''' {{RageType|string}} *'''textureName:''' {{RageType|string}} === Return Value === *'''void''' {{RageType|void}} ==Syntax== <pre> vehicle.setLiveryTexture(textureDict, textureName); </pre> ==Example== {{ClientsideCode| <syntaxhighlight lang="javascript"> const vehicle = mp.vehicles.atRemoteId(0); if (!vehicle || !mp.vehicles.exists(vehicl...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Client-Side
Function

 JavaScript



JavaScript Syntax

Set a custom texture livery to the given vehicle.

Required Params

  • textureDict: string
  • textureName: string

Return Value

  • void void

Syntax

vehicle.setLiveryTexture(textureDict, textureName);

Example

Client-Side
const vehicle = mp.vehicles.atRemoteId(0);
if (!vehicle || !mp.vehicles.exists(vehicle)) return;
/* You'd probably have to load the texture dict prior. */
vehicle.setLiveryTexture('livery_dict_name', 'texture_name');


See also