local memory = require("memory")
local pt = 1
function main()
while not isSampAvailable() do wait(0) end
while true do
wait(0)
if getCurrentCharWeapon(PLAYER_PED) == 24 and getAmmoInClip() == pt then
setCurrentCharWeapon(PLAYER_PED, 0)
sampForceOnfootSync()
wait(200)
setCurrentCharWeapon(PLAYER_PED, 24)
end
end
function getAmmoInClip()
return memory.getuint32(
getCharPointer(PLAYER_PED) + 0x5A0 +
getWeapontypeSlot(getCurrentCharWeapon(PLAYER_PED)) * 0x1C +
0x8
)
end