zcnpci/lua/autorun/client/fedh_menu.lua

39 lines
1.6 KiB
Lua
Raw Normal View History

local function PopulateRagdollSBXToolMenu(pnl)
pnl:CheckBox("Enabled", "zcnpci_enabled")
2026-05-25 04:57:41 +00:00
pnl:ControlHelp("Enable or disable the addon.")
pnl:Help(" ")
pnl:NumSlider("Stumble time", "zcnpci_stumble_time", 0, 10, 3)
pnl:ControlHelp("How long the ragdoll should try to stumble for.")
2026-05-25 04:57:41 +00:00
pnl:NumSlider("Wound grab chance", "zcnpci_woundgrab_chance", 0, 1, 3)
2026-05-25 04:57:41 +00:00
pnl:ControlHelp("The chance the ragdoll will grab it's wound when shot.")
pnl:NumSlider("Wound grab time", "zcnpci_woundgrab_time", 0, 10, 3)
2026-05-25 04:57:41 +00:00
pnl:ControlHelp("How long the ragdoll should hold its wound.")
pnl:NumSlider("Minimum down time", "zcnpci_down_time", 0, 20, 3)
pnl:ControlHelp("The minimum amount of time the ragdoll should be down before trying to get back up.")
2026-05-25 04:57:41 +00:00
pnl:Help(" ")
pnl:NumSlider("Activation range", "zcnpci_active_range", 0, 5000, 0)
2026-05-25 04:57:41 +00:00
pnl:ControlHelp("How close the ragdoll has to be to a player to have euphoria physics")
pnl:CheckBox("Always activate on player kill", "zcnpci_always_active_on_player_kill")
2026-05-25 04:57:41 +00:00
pnl:ControlHelp("If on, all player-killed ragdolls will be activated regardless of other factors.")
end
if engine.ActiveGamemode() == "sandbox" then
hook.Add("AddToolMenuCategories", "ZCNPCICategory", function()
spawnmenu.AddToolCategory("Utilities", "zcnpci", "Z-City NPCi")
2026-05-25 04:57:41 +00:00
end)
hook.Add("PopulateToolMenu", "ZCNPCIMenuSettings", function()
spawnmenu.AddToolMenuOption("Utilities", "zcnpci", "RagdollSettings", "Ragdoll", "", "", function(pnl)
2026-05-25 04:57:41 +00:00
pnl:ClearControls()
PopulateRagdollSBXToolMenu(pnl)
2026-05-25 04:57:41 +00:00
end)
end)
end