local autoShoot = false
local canChatCommandBeCreated = isSampLoaded() and isSampfuncsLoaded()
function main()
if canChatCommandBeCreated then
while not isSampAvailable() do
wait()
end
sampRegisterChatCommand('autoshoot', activate)
end
while true do
if not canChatCommandBeCreated then
if testCheat('autoshoot') then
activate()
end
end
if autoShoot and isCharOnFoot(playerPed) then
wait(10000)
for _ = 1, 30 do
setGameKeyState(6, 255)
wait()
end
end
wait()
end
end
function activate()
autoShoot = not autoShoot
printStringNow(autoShoot and "Shooting automatically" or "Deactivated", 1000)
end