Difference between revisions of "MDE Scripting: GetWeaponNameFromID"
From Nomad DB
Line 14: | Line 14: | ||
− | == Description == | + | ==Description== |
− | + | Returns the weapon model name | |
See [[MDE_Scripting:_Weapons|Weapons]] to know weapons id. | See [[MDE_Scripting:_Weapons|Weapons]] to know weapons id. | ||
− | == Parameters == | + | ==Parameters== |
{| class="wikitable" width="100%" | {| class="wikitable" width="100%" | ||
!Name | !Name | ||
Line 32: | Line 32: | ||
− | == Returns == | + | ==Returns== |
{| class="wikitable" width="100%" | {| class="wikitable" width="100%" | ||
!# | !# | ||
Line 44: | Line 44: | ||
− | == Example == | + | ==Example== |
{| class="wikitable" | {| class="wikitable" | ||
|<syntaxhighlight lang="lua"> | |<syntaxhighlight lang="lua"> | ||
Line 50: | Line 50: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
+ | |||
Revision as of 23:58, 15 October 2020
Syntax | game.game:GetWeaponNameFromID(number weaponID)
|
---|---|
Module | Game |
Library | Game |
Game | Mafia: Definitive Edition |
Description
Returns the weapon model name
See Weapons to know weapons id.
Parameters
Name | Type | Description |
---|---|---|
weaponID | number | Find id here : Weapons |
Returns
# | Type | Description |
---|---|---|
1 | string | Weapon model name |
Example
local weaponName = game.game:GetWeaponNameFromID(84) -- weaponName returns "smg_trench_a_v1"
|