getModsCount

Used to get the maximum number of mods in a category.

This will return the number of mods for a given vehicle mod index.

For example using this on an elegy with index 0 returned 20.

Returns a number.

Declaration

vehicle.getModsCount(modIndex: number): number;

Usage

const modsCount = vehicle.getModsCount();

Real World Example

const vehicle = new alt.Vehicle(`elegy`, 0, 0, 0, 0, 0, 0);
vehicle.modKit = 1;
const modsCount = vehicle.getModsCount(0); // 20

console.log(`Elegy has ${modsCount} for index 0`);

These examples assume you have vehicle created or available on server-side

results matching ""

    No results matching ""