Guest User

Untitled

a guest
Sep 1st, 2025
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | None | 0 0
  1. -- Example:
  2. local ped = PlayerPedId()
  3. local weaponGuid = DataView.ArrayBuffer(16 * 8)
  4.  
  5. for attachPoint = 0, 3 do
  6.     if (Citizen.InvokeNative(0x6929E22158E52265, ped, attachPoint, weaponGuid:Buffer())) then -- GET_PED_WEAPON_GUID_AT_ATTACH_POINT
  7.         local ammo = Citizen.InvokeNative(0x4823F13A21F51964, ped, weaponGuid:Buffer()) or 0
  8.         print(string.format("You have %s ammo in the weapon at attach point #%s", ammo, attachPoint))
  9.     end
  10. end
  11. -- This will return the total ammo of each of the player weapon slots
Add Comment
Please, Sign In to add comment