local sampev = require("samp.events")
require("addon")
local time = 0
local eat = false
function sampev.onDisplayGameText(style, time, text)
if text:find("hungry") then
eat = true
sendInput("/eat")
end
end
function sampev.onShowDialog(id, style, title, button1, button2, text)
if title:find(" ушать") and eat then
sendDialogResponse(id, 1, 2, "")
eat = false
end
end
function sampev.onSetPlayerHealth(health)
if health < 50 then
sendInput("/smoke")
end
end