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

20 lines
773 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('karma', {
name = 'Карма',
icon = 'octoteam/icons/star.png',
openSettings = function(panel, data)
octolib.label(panel, 'Отключает изменение кармы для игроков')
octolib.label(panel, 'Сбрасывается, если игрок перезайдет')
octolib.label(panel, 'ПОЖАЛУЙСТА, НЕ ЗАБУДЬ ВЕРНУТЬ ОБРАТНО ПОСЛЕ ИВЕНТА!'):SetFont('DermaDefaultBold')
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,
})