Difference between revisions of "MDE Scripting: GetWeaponNameFromID"
From Nomad DB
(6 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
|- | |- | ||
!Module | !Module | ||
− | |[[ | + | |[[MDE Scripting: Game Library#Game|Game]] |
|- | |- | ||
!Library | !Library | ||
− | |[[ | + | |[[MDE Scripting: Game Library|Game]] |
|- | |- | ||
!Game | !Game | ||
− | |[[ | + | |[[MDE Scripting|Mafia: Definitive Edition]] |
|} | |} | ||
− | == Description == | + | ==Description== |
− | + | Returns the weapon model name | |
− | See [[ | + | See [[MDE Scripting: Weapons|Weapons]] to know weapons id. |
− | == Parameters == | + | ==Parameters== |
{| class="wikitable" width="100%" | {| class="wikitable" width="100%" | ||
!Name | !Name | ||
Line 28: | Line 28: | ||
|weaponID | |weaponID | ||
|number | |number | ||
− | |Find id here : [[ | + | |Find id here : [[MDE Scripting: Weapons|Weapons]] |
|} | |} | ||
− | == Returns == | + | ==Returns== |
{| class="wikitable" width="100%" | {| class="wikitable" width="100%" | ||
!# | !# | ||
Line 38: | Line 38: | ||
!Description | !Description | ||
|- | |- | ||
− | |1 | + | | style="font-weight: bold; text-align:center;" | 1 |
|string | |string | ||
|Weapon model name | |Weapon model name | ||
Line 44: | Line 44: | ||
− | == | + | ==Examples== |
− | + | <syntaxhighlight lang="lua"> | |
− | + | local weaponName = game.game:GetWeaponNameFromID(84) -- returns "smg_trench_a_v1" | |
− | local weaponName = game.game:GetWeaponNameFromID(84) -- | ||
</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"