Isigar

GTA V | Gun type

Aug 15th, 2021
1,601
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.53 KB | None | 0 0
  1. local pistolTypeGroups = {
  2.     [416676503] = 'pistol',
  3.     [-957766203] = 'micro_smg',
  4.     [970310034] = 'assault_rifle',
  5.     [-1212426201] = 'sniper_rifle',
  6.     [-728555052] = 'unarmed',
  7.     [860033945] = 'shotgun',
  8.     [-1569042529] = 'rpg',
  9.     [1548507267] = 'grenade',
  10.     [1159398588] = 'heavy_guns', --MG
  11. }
  12.  
  13. --Example
  14. local currentPedWeapon = GetSelectedPedWeapon(ped)
  15. local slot = GetWeapontypeGroup(currentPedWeapon)
  16. local slotName = pistolTypeGroups[slot]
  17. if slotName == 'pistol' then
  18.     print('He has some pistol')
  19. end
Advertisement
Add Comment
Please, Sign In to add comment