Вы используете устаревший браузер. Этот и другие сайты могут отображаться в нём некорректно. Вам необходимо обновить браузер или попробовать использовать другой.
:get() returns true if key is being held, :key() returns keycode
you can make a default if true then false statement to make it do smth after a key click
example:
local penis = ui.create("asd"):hotkey("laff")
local key_click_cache = false
events.render:set(function()
if penis:get() and not key_click_cache then
print_dev("ja bra tha key clicked")
end
key_click_cache = penis:get()
end)
:get() returns true if key is being held, :key() returns keycode
you can make a default if true then false statement to make it do smth after a key click
example:
local penis = ui.create("asd"):hotkey("laff")
local key_click_cache = false
events.render:set(function()
if penis:get() and not key_click_cache then
print_dev("ja bra tha key clicked")
end
key_click_cache = penis:get()
end)
looks shit but works perfectly so idfc
you should also do checks if you have some granade in ur hand
Код:
local penis = ui.create("asd"):hotkey("laff")
local key_click_cache = false
local nades_list = {"weapon_incgrenade", "weapon_hegrenade"}
events.render:set(function()
if penis:get() and not key_click_cache then
for index, grenade in pairs(nades_list) do
utils.execute_after(0.1 * index, function()
utils.console_exec(string.format("use %s", grenade))
utils.execute_after(0.05 * index, function() utils.console_exec("drop") end)
end)
end
end
key_click_cache = penis:get()
end)