local ev = require 'lib.samp.events'
local enable = true
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand("aeat", function()
enable = not enable
sampAddChatMessage(enable and "Автоеда работает!" or "Автоеда не работает!")
end)
while true do
wait(0)
end
end
function ev.onDisplayGameText(style, time, text)
if text:find("You are hungry!") or text:find("You are very hungry!") and enable then
sampSendChat("/jmeat")
return false
end
end