Yes, but I wanna make it to work.[MenuGroup]:hotkey(name: string, default_key: number)
:get() returns true if key is being held, :key() returns keycodeYes, but I wanna make it to work.
Like it should drop nades.
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)
group:hotkey(name: string[, default_key: number): MenuItem если потом понадобится гетнуть бинд ака кнопку бинда, то ui.get_binds(): tableHow can I make nade drop script on keybind as in ss for neverlose?
![]()
Thanks: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 idfcIs there other way to make drop nade? Cuz when I use this method it's only drops the hegrenade.
Посмотреть вложение 250095
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)
Проект предоставляет различный материал, относящийся к сфере киберспорта, программирования, ПО для игр, а также позволяет его участникам общаться на многие другие темы. Почта для жалоб: admin@yougame.biz