Vehicle::getMod

From RAGE Multiplayer Wiki
Revision as of 02:57, 27 April 2020 by MrPancakers2 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Shared
Function

 JavaScript


Gets the mod currently applied on your vehicle in the targetted modType.

JavaScript Syntax

Syntax

vehicle.getMod(modType);

Parameters

  • modType: Int

Return value

  • modIndex: Int

Examples

Server-Side
mp.events.addCommand('spoiler', (player) => {
	if(!player.vehicle) return player.outputChatBox("You need to be in a vehicle to use this command.");
	let modIndex = player.vehicle.getMod(0);
	player.outputChatBox(`The mod index ID for your spoiler is ${modIndex}`);
});


See Also