Vehicle::getMod: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
Line 1: Line 1:
In b944, there are 50 (0 - 49) mod types.<br><br>Returns 255 if the vehicle mod is stock
In b944, there are 50 (0 - 49) mod types.<br><br>Returns -1 if the vehicle mod is stock
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">vehicle.getMod(modType);</syntaxhighlight>
<syntaxhighlight lang="javascript">vehicle.getMod(modType);</syntaxhighlight>

Revision as of 23:17, 26 April 2020

In b944, there are 50 (0 - 49) mod types.

Returns -1 if the vehicle mod is stock

Syntax

vehicle.getMod(modType);

Required Arguments

  • modType: int

Return value

  • int

Example

const player = mp.players.local;

if (player.vehicle) {
    mp.gui.chat.push(player.vehicle.getMod(1).toString());
}

else mp.gui.chat.push("You need a car!");

See also