script_name("example")
script_author("example")
local vk = require "vkeys"
local memory = require "memory"
function main()
while not isSampAvailable() do wait(0) end
while true do
wait(0)
ammo = getAmmoInClip()
if wasKeyPressed(vk.VK_MBUTTON) then
active = not active
end
if wasKeyPressed(vk.VK_LBUTTON) and active and ammo == 7 and isCurrentCharWeapon(PLAYER_PED, 24) then
setGameKeyState(17, 255)
end
end
end
function getAmmoInClip()
local pointer =...