ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. getWeaponsInSlot

Function

getWeaponsInSlot

Server and clientWeaponsTrilogy Hub only

Returns the weapon IDs that belong to an inventory slot.

Syntax

table getWeaponsInSlot(int slot)

Arguments

slotint
Slot number 0-12.

Returns

A table of weapon IDs (empty if the slot has none).

Example

for _, id in ipairs(getWeaponsInSlot(5)) do
    print(getWeaponNameFromID(id))
end