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

Function

getSlotFromWeapon

Server and clientWeaponsIdentical to MTA:SA

Returns the inventory slot (0-12) a weapon ID goes into.

Syntax

int getSlotFromWeapon(int weapon)

Arguments

weaponint
Weapon ID.

Returns

The slot number or false.

Example

print(getSlotFromWeapon(31))

See also