Vehicle::setMod

From RAGE Multiplayer Wiki
Revision as of 02:46, 27 April 2020 by MrPancakers2 (talk | contribs)

Shared
Function

 JavaScript


Applies the specified mod onto the vehicle.

JavaScript Syntax

Syntax

vehicle.setMod(modType, modIndex);

Parameters

  • modType: Int
  • modIndex: Int

Examples

Server-Side
mp.events.addCommand('mod', (player, _, modType , modIndex) => {
	if(!player.vehicle) return player.outputChatBox("You need to be in a vehicle to use this command.");
	player.vehicle.setMod(parseInt(modType), parseInt(modIndex));
	player.outputChatBox(`Mod Type ${modType} with Mod Index ${modIndex} applied.`);
});


See Also