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

Vehicle::setMod

Материал из RAGE MP Wiki Archive
Версия от 20:25, 11 сентября 2020; imported>SugarD-x (Moved vehicle mod list to more appropriate location, and cleaned up some minor code and readability issues.)
(разн.) ← Предыдущая версия | Текущая версия (разн.) | Следующая версия → (разн.)

Shared
Function

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


Applies the specified mod onto the vehicle.

Syntax

vehicle.setMod(modType, modIndex);

Parameters

  • modType: Int
  • modIndex: Int

Example

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