Vehicle::getWheelGroundSurfaceMaterial

From RAGE Multiplayer Wiki
Revision as of 22:55, 24 December 2024 by Shr0x (talk | contribs) (Created page with "{{ClientsideJsFunction}} {{JSContainer| === Summary === Returns the surface material beneath a specific wheel of a vehicle. === Syntax === <syntaxhighlight lang="javascript"> vehicle.getWheelGroundSurfaceMaterial(wheelIndex); </syntaxhighlight> === Required Parameters === * '''wheelIndex:''' {{RageType|number}} The index of the wheel (0 / front left, 1 / front right, etc.). === Return Value === * '''{{RageType|number}}''' - The material identifier for the surface ben...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Client-Side
Function

 JavaScript



JavaScript Syntax


Summary

Returns the surface material beneath a specific wheel of a vehicle.

Syntax

vehicle.getWheelGroundSurfaceMaterial(wheelIndex);

Required Parameters

  • wheelIndex: number The index of the wheel (0 / front left, 1 / front right, etc.).

Return Value

  • 'number' - The material identifier for the surface beneath the wheel.

Example

// Check the ground surface material under the front-left wheel
const material = mp.vehicles.local.getWheelGroundSurfaceMaterial(0);
mp.gui.chat.push(`Ground material under front-left wheel: ${material}`);


See Also