-- В main
sampRegisterChatCommand("hp", function()
local hp = getCharHealth(PLAYER_PED)
if hp < 20 then
lua_thread.create(function()
setVirtualKeyDown(18, true)
wait(50)
setVirtualKeyDown(18, false)
wait(200)
setVirtualKeyDown(13, true)
wait(50)
setVirtualKeyDown(13, false)
end)
else
sampAddChatMessage("У перса больше 20 хп!", -1)
end
end)