Advertisement
glitchdetector

FiveM Weapon Hash to Label

May 13th, 2020
1,494
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.60 KB | None | 0 0
  1. local WeaponHashToLabel = {
  2.     [0] = {"WT_INVALID", "WTU_INVALID"},
  3.     [`weapon_unarmed`] = {"WT_UNARMED", "WTU_UNARMED", "WTD_UNARMED"},
  4.     [`weapon_pistol`] = {"WT_PIST", "WTU_PIST", "WTD_PIST"},
  5.     [`weapon_combatpistol`] = {"WT_PIST_CBT", "WTU_PIST_CBT", "WTD_PIST_CBT"},
  6.     [`weapon_appistol`] = {"WT_PIST_AP", "WTU_PIST_AP", "WTD_PIST_AP"},
  7.     [`weapon_smg`] = {"WT_SMG", "WTU_SMG", "WTD_SMG"},
  8.     [`weapon_microsmg`] = {"WT_SMG_MCR", "WTU_SMG_MCR", "WTD_SMG_MCR"},
  9.     [`weapon_assaultrifle`] = {"WT_RIFLE_ASL", "WTU_RIFLE_ASL", "WTD_RIFLE_ASL"},
  10.     [`weapon_carbinerifle`] = {"WT_RIFLE_CBN", "WTU_RIFLE_CBN", "WTD_RIFLE_CBN"},
  11.     [`weapon_advancedrifle`] = {"WT_RIFLE_ADV", "WTU_RIFLE_ADV", "WTD_RIFLE_ADV"},
  12.     [`weapon_mg`] = {"WT_MG", "WTU_MG", "WTD_MG"},
  13.     [`weapon_combatmg`] = {"WT_MG_CBT", "WTU_MG_CBT", "WTD_MG_CBT"},
  14.     [`weapon_pumpshotgun`] = {"WT_SG_PMP", "WTU_SG_PMP", "WTD_SG_PMP"},
  15.     [`weapon_sawnoffshotgun`] = {"WT_SG_SOF", "WTU_SG_SOF", "WTD_SG_SOF"},
  16.     [`weapon_assaultshotgun`] = {"WT_SG_ASL", "WTU_SG_ASL", "WTD_SG_ASL"},
  17.     [`weapon_heavysniper`] = {"WT_SNIP_HVY", "WTU_SNIP_HVY", "WTD_SNIP_HVY"},
  18.     [`weapon_remotesniper`] = {"WT_SNIP_RMT", "WTU_SNIP_RMT", "WTD_SNIP_RMT"},
  19.     [`weapon_sniperrifle`] = {"WT_SNIP_RIF", "WTU_SNIP_RIF", "WTD_SNIP_RIF"},
  20.     [`weapon_grenadelauncher`] = {"WT_GL", "WTU_GL", "WTD_GL"},
  21.     [`weapon_rpg`] = {"WT_RPG", "WTU_RPG", "WTD_RPG"},
  22.     [`weapon_minigun`] = {"WT_MINIGUN", "WTU_MINIGUN", "WTD_MINIGUN"},
  23.     [`weapon_grenade`] = {"WT_GNADE", "WTU_GNADE", "WTD_GNADE"},
  24.     [`weapon_smokegrenade`] = {"WT_GNADE_SMK", "WTU_GNADE_SMK", "WTD_GNADE_SMK"},
  25.     [`weapon_stickybomb`] = {"WT_GNADE_STK", "WTU_GNADE_STK", "WTD_GNADE_STK"},
  26.     [`weapon_molotov`] = {"WT_MOLOTOV", "WTU_MOLOTOV", "WTD_MOLOTOV"},
  27.     [`weapon_stungun`] = {"WT_STUN", "WTU_STUN", "WTD_STUN"},
  28.     [`weapon_petrolcan`] = {"WT_PETROL", "WTU_PETROL", "WTD_PETROL"},
  29.     [`weapon_electric_fence`] = {"WT_ELCFEN", "WTU_ELCFEN", "WTD_ELCFEN"},
  30.     [`vehicle_weapon_tank`] = {"WT_V_TANK", "WTU_V_TANK", "WTD_V_TANK"},
  31.     [`vehicle_weapon_space_rocket`] = {"WT_V_SPACERKT", "WTU_V_SPACERKT", "WTD_V_SPACERKT"},
  32.     [`vehicle_weapon_player_laser`] = {"WT_V_PLRLSR", "WTU_V_PLRLSR", "WTD_V_PLRLSR"},
  33.     [`object`] = {"WT_OBJECT", "WTU_OBJECT", "WTD_OBJECT"},
  34.     [`gadget_parachute`] = {"WT_PARA", "WTU_PARA", "WTD_PARA"},
  35.     [1742569970] = {"WT_A_RPG", "WTU_A_RPG", "WTD_A_RPG"},
  36.     [-1474608608] = {"WT_A_TANK", "WTU_A_TANK", "WTD_A_TANK"},
  37.     [527765612] = {"WT_A_SPACERKT", "WTU_A_SPACERKT", "WTD_A_SPACERKT"},
  38.     [-165357558] = {"WT_A_PLRLSR", "WTU_A_PLRLSR", "WTD_A_PLRLSR"},
  39.     [-1372674932] = {"WT_A_ENMYLSR", "WTU_A_ENMYLSR", "WTD_A_ENMYLSR"},
  40.     [`weapon_knife`] = {"WT_KNIFE", "WTU_KNIFE", "WTD_KNIFE"},
  41.     [`weapon_nightstick`] = {"WT_NGTSTK", "WTU_NGTSTK", "WTD_NGTSTK"},
  42.     [`weapon_hammer`] = {"WT_HAMMER", "WTU_HAMMER", "WTD_HAMMER"},
  43.     [`weapon_bat`] = {"WT_BAT", "WTU_BAT", "WTD_BAT"},
  44.     [`weapon_crowbar`] = {"WT_CROWBAR", "WTU_CROWBAR", "WTD_CROWBAR"},
  45.     [`weapon_golfclub`] = {"WT_GOLFCLUB", "WTU_GOLFCLUB", "WTD_GOLFCLUB"},
  46.     [`weapon_rammed_by_car`] = {"WT_PIST", "WTU_PIST", "WTD_PIST"},
  47.     [`weapon_run_over_by_car`] = {"WT_PIST", "WTU_PIST", "WTD_PIST"},
  48.     [`weapon_assaultsmg`] = {"WT_SMG_ASL", "WTU_SMG_ASL", "WTD_SMG_ASL"},
  49.     [`weapon_bullpupshotgun`] = {"WT_SG_BLP", "WTU_SG_BLP", "WTD_SG_BLP"},
  50.     [`weapon_pistol50`] = {"WT_PIST_50", "WTU_PIST_50", "WTD_PIST_50"},
  51.     [`weapon_bottle`] = {"WT_BOTTLE", "WTU_BOTTLE", "WTD_BOTTLE"},
  52.     [`weapon_gusenberg`] = {"WT_GUSENBERG", "WTU_GUSENBERG", "WTD_GUSENBERG"},
  53.     [`weapon_snspistol`] = {"WT_SNSPISTOL", "WTU_SNSPISTOL", "WTD_SNSPISTOL"},
  54.     [`weapon_vintagepistol`] = {"WT_VPISTOL", "WTU_VPISTOL", "WTD_VPISTOL"},
  55.     [`weapon_dagger`] = {"WT_DAGGER", "WTU_DAGGER", "WTD_DAGGER"},
  56.     [`weapon_flaregun`] = {"WT_FLAREGUN", "WTU_FLAREGUN", "WTD_FLAREGUN"},
  57.     [`weapon_heavypistol`] = {"WT_HEAVYPSTL", "WTU_HEAVYPSTL", "WTD_HEAVYPSTL"},
  58.     [`weapon_specialcarbine`] = {"WT_RIFLE_SCBN", "WTU_RIFLE_SCBN", "WTD_RIFLE_SCBN"},
  59.     [`weapon_musket`] = {"WT_MUSKET", "WTU_MUSKET", "WTD_MUSKET"},
  60.     [`weapon_firework`] = {"WT_FWRKLNCHR", "WTU_FWRKLNCHR", "WTD_FWRKLNCHR"},
  61.     [`weapon_marksmanrifle`] = {"WT_MKRIFLE", "WTU_MKRIFLE", "WTD_MKRIFLE"},
  62.     [`weapon_heavyshotgun`] = {"WT_HVYSHOT", "WTU_HVYSHOT", "WTD_HVYSHOT"},
  63.     [`weapon_proxmine`] = {"WT_PRXMINE", "WTU_PRXMINE", "WTD_PRXMINE"},
  64.     [`weapon_hominglauncher`] = {"WT_HOMLNCH", "WTU_HOMLNCH", "WTD_HOMLNCH"},
  65.     [`weapon_hatchet`] = {"WT_HATCHET", "WTU_HATCHET", "WTD_HATCHET"},
  66.     [`weapon_railgun`] = {"WT_RAILGUN", "WTU_RAILGUN", "WTD_RAILGUN"},
  67.     [`weapon_combatpdw`] = {"WT_COMBATPDW", "WTU_COMBATPDW", "WTD_COMBATPDW"},
  68.     [`weapon_knuckle`] = {"WT_KNUCKLE", "WTU_KNUCKLE", "WTD_KNUCKLE"},
  69.     [`weapon_marksmanpistol`] = {"WT_MKPISTOL", "WTU_MKPISTOL", "WTD_MKPISTOL"},
  70.     [`weapon_bullpuprifle`] = {"WT_BULLRIFLE", "WTU_BULLRIFLE", "WTD_BULLRIFLE"},
  71.     [`weapon_machete`] = {"WT_MACHETE", "WTU_MACHETE", "WTD_MACHETE"},
  72.     [`weapon_machinepistol`] = {"WT_MCHPIST", "WTU_MCHPIST", "WTD_MCHPIST"},
  73.     [`weapon_flashlight`] = {"WT_FLASHLIGHT", "WTU_FLASHLIGHT", "WTD_FLASHLIGHT"},
  74.     [`weapon_dbshotgun`] = {"WT_DBSHGN", "WTU_DBSHGN", "WTD_DBSHGN"},
  75.     [`weapon_compactrifle`] = {"WT_CMPRIFLE", "WTU_CMPRIFLE", "WTD_CMPRIFLE"},
  76.     [`weapon_switchblade`] = {"WT_SWBLADE", "WTU_SWBLADE", "WTD_SWBLADE"},
  77.     [`weapon_revolver`] = {"WT_REVOLVER", "WTU_REVOLVER", "WTD_REVOLVER"},
  78.     [`weapon_autoshotgun`] = {"WT_AUTOSHGN", "WTU_AUTOSHGN", "WTD_AUTOSHGN"},
  79.     [`weapon_battleaxe`] = {"WT_BATTLEAXE", "WTU_BATTLEAXE", "WTD_BATTLEAXE"},
  80.     [`weapon_compactlauncher`] = {"WT_CMPGL", "WTU_CMPGL", "WTD_CMPGL"},
  81.     [`weapon_minismg`] = {"WT_MINISMG", "WTU_MINISMG", "WTD_MINISMG"},
  82.     [`weapon_pipebomb`] = {"WT_PIPEBOMB", "WTU_PIPEBOMB", "WTD_PIPEBOMB"},
  83.     [`weapon_poolcue`] = {"WT_POOLCUE", "WTU_POOLCUE", "WTD_POOLCUE"},
  84.     [`weapon_wrench`] = {"WT_WRENCH", "WTU_WRENCH", "WTD_WRENCH"},
  85.     [`weapon_cougar`] = {"WT_RAGE"},
  86.     [-159960575] = {"WT_VEH_WEP"},
  87.     [`weapon_pistol_mk2`] = {"WT_PIST2", "WTU_PIST2", "WTD_PIST2"},
  88.     [`weapon_smg_mk2`] = {"WT_SMG2", "WTU_SMG2", "WTD_SMG2"},
  89.     [`weapon_heavysniper_mk2`] = {"WT_SNIP_HVY2", "WTU_SNIP_HVY2", "WTD_SNIP_HVY2"},
  90.     [`weapon_combatmg_mk2`] = {"WT_MG_CBT2", "WTU_MG_CBT2", "WTD_MG_CBT2"},
  91.     [`weapon_assaultrifle_mk2`] = {"WT_RIFLE_ASL2", "WTU_RIFLE_ASL2", "WTD_RIFLE_ASL2"},
  92.     [`weapon_carbinerifle_mk2`] = {"WT_RIFLE_CBN2", "WTU_RIFLE_CBN2", "WTD_RIFLE_CBN2"},
  93.     [`weapon_pumpshotgun_mk2`] = {"WT_SG_PMP2", "WTU_SG_PMP2", "WTD_SG_PMP2"},
  94.     [`weapon_specialcarbine_mk2`] = {"WT_SPCARBINE2", "WTU_SPCARBINE2", "WTD_SPCARBINE2"},
  95.     [`weapon_snspistol_mk2`] = {"WT_SNSPISTOL2", "WTU_SNSPISTOL2", "WTD_SNSPISTOL2"},
  96.     [`weapon_marksmanrifle_mk2`] = {"WT_MKRIFLE2", "WTU_MKRIFLE2", "WTD_MKRIFLE2"},
  97.     [`weapon_revolver_mk2`] = {"WT_REVOLVER2", "WTU_REVOLVER2", "WTD_REVOLVER2"},
  98.     [`weapon_bullpuprifle_mk2`] = {"WT_BULLRIFLE2", "WTU_BULLRIFLE2", "WTD_BULLRIFLE2"},
  99.     [`weapon_doubleaction`] = {"WT_REV_DA", "WTU_REV_DA", "WTD_REV_DA"},
  100.     [`weapon_stone_hatchet`] = {"WT_SHATCHET", "WTU_SHATCHET", "WTD_SHATCHET"},
  101. }
  102.  
  103. function GetWeaponLabelFromHash(weaponHash)
  104.     return WeaponHashToLabel[weaponHash] ~= nil and WeaponHashToLabel[weaponHash][1] or nil
  105. end
  106. function GetWeaponLabelUppercaseFromHash(weaponHash)
  107.     return WeaponHashToLabel[weaponHash] ~= nil and WeaponHashToLabel[weaponHash][2] or nil
  108. end
  109. function GetWeaponDescriptionLabelFromHash(weaponHash)
  110.     return WeaponHashToLabel[weaponHash] ~= nil and WeaponHashToLabel[weaponHash][3] or nil
  111. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement