Difference between revisions of "MDE Scripting: GetWeaponNameFromID"
From Nomad DB
Line 1: | Line 1: | ||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
!Syntax | !Syntax | ||
Line 47: | Line 46: | ||
==Examples== | ==Examples== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
− | local weaponName = game.game:GetWeaponNameFromID(84) -- | + | local weaponName = game.game:GetWeaponNameFromID(84) -- returns "smg_trench_a_v1" |
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | ==Related Pages== | ||
+ | [[MDE Scripting: GetItemIDFromName|GetItemIDFromName]] | ||
+ | {{Page_MDE}} | ||
__NOTOC__ | __NOTOC__ | ||
+ | |||
[[Category:MDE]] | [[Category:MDE]] |
Latest revision as of 19:21, 10 November 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 |
Examples
local weaponName = game.game:GetWeaponNameFromID(84) -- returns "smg_trench_a_v1"