# getVehicleUpgradeSlotName (Shared)

> Returns the name of an upgrade slot, from the slot's index or from an upgrade that goes on it.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Shared
- **Category**: Vehicles
- **URL**: https://wiki.mymp.gg/en/getVehicleUpgradeSlotName

## Syntax

```lua
string|false getVehicleUpgradeSlotName(int|string slotOrUpgrade)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `slotOrUpgrade` | `int\|string` | The slot's index, counted from 0 in the order of `getVehicleUpgradeSlots`, or an upgrade's model name. |

## Returns

The slot's name, or `false` if the index does not exist or no vehicle takes the upgrade.

## Example

```lua
addCommandHandler("pecas", function(player)
    local vehicle = getPedOccupiedVehicle(player)
    if not vehicle then return end
    for _, upgrade in ipairs(getVehicleUpgrades(vehicle)) do
        outputDebugString(upgrade .. " (" .. getVehicleUpgradeSlotName(upgrade) .. ")")
    end
end)
```

### Coming from MTA

MTA uses numeric upgrade ids (1000 to 1193). Here an upgrade is its model's name, and the slots are the ones the mounted packs declare.

## See also

- [getVehicleUpgradeSlots (Shared)](https://wiki.mymp.gg/en/getVehicleUpgradeSlots.md): Returns the names of every upgrade slot the mounted packs declare.
- [getVehicleUpgradeOnSlot (Shared)](https://wiki.mymp.gg/en/getVehicleUpgradeOnSlot.md): Returns the upgrade fitted on one slot of a vehicle.
