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

Function

getWeaponModelFromID

Server and clientWeaponsTrilogy Hub only

Returns the model ID a ped holds in hand for a weapon.

Syntax

int getWeaponModelFromID(int weapon)

Arguments

weaponint
Weapon ID (0-46).

Returns

Model ID, or false if the weapon has no model (e.g. fist).

Example

local model = getWeaponModelFromID(31)
createObject(model, 2495.0, -1670.0, 13.0)