dobrograd-13-06-2022/garrysmod/addons/feature-gmpanel/lua/gmpanel/actions/hunger/client.lua
Jonny_Bro (Nikita) e4d5311906 first commit
2023-11-16 15:01:19 +05:00

21 lines
663 B
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

gmpanel.actions.registerAction('hunger', {
name = 'Голод',
icon = 'octoteam/icons/food_meat3.png',
openSettings = function(panel, data)
local lbl = octolib.label(panel, 'Отключает голод игрокам. НЕ ЗАБУДЬ ВКЛЮЧИТЬ ОБРАТНО ПОСЛЕ ИВЕНТА!')
lbl:SetMultiline(true)
lbl:SetWrap(true)
lbl:SetTall(25)
local onoff = octolib.checkBox(panel, 'Не снимать голод')
if data.value == nil then
onoff:SetChecked(true)
else onoff:SetChecked(data.value) end
panel.status = onoff
end,
getData = function(panel)
return IsValid(panel.status) and panel.status:GetChecked()
end,
})