Перейти к содержанию

Vehicle::getMod

Материал из RAGE MP Wiki Archive
Версия от 02:57, 27 апреля 2020; imported>MrPancakers2
(разн.) ← Предыдущая версия | Текущая версия (разн.) | Следующая версия → (разн.)

Shared
Function

Ошибка создания миниатюры: Не удаётся сохранить эскиз по месту назначения JavaScript


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

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