local function PopulateRagdollSBXToolMenu(pnl) pnl:CheckBox("Enabled", "zcnpci_enabled") pnl:ControlHelp("Enable or disable the addon.") pnl:Help(" ") pnl:Help(" ") pnl:NumSlider("Stumble time", "zcnpci_stumble_time", 0, 10, 3) pnl:ControlHelp("How long the ragdoll should try to stumble for.") pnl:NumSlider("Wound grab chance", "zcnpci_woundgrab_chance", 0, 1, 3) pnl:ControlHelp("The chance the ragdoll will grab it's wound when shot.") pnl:NumSlider("Wound grab time", "zcnpci_woundgrab_time", 0, 10, 3) 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.") end local function PopulatePerformanceSBXToolMenu(pnl) pnl:NumSlider("Activation range", "zcnpci_active_range", 0, 5000, 0) pnl:ControlHelp("How close the ragdoll has to be to a player to be living when downed by damage. Enemies downed by other causes are unaffected.") pnl:CheckBox("Always activate on player kill", "zcnpci_always_active_on_player_kill") pnl:ControlHelp("If on, all player-damaged ragdolls will be activated regardless of other factors.") pnl:Help(" ") pnl:Help(" ") pnl:CheckBox("Enable automatic corpse removal", "zcnpci_enable_corpse_removal") pnl:ControlHelp("Enable or disable the removal of dead corpses.") pnl:NumSlider("Max corpses", "zcnpci_max_corpses", -1, 64, 0) pnl:ControlHelp("The maximum amount of dead corpses that are allowed before one is removed. Set to -1 to disable") pnl:NumSlider("Max time", "zcnpci_max_corpse_time", -1, 600, 2) pnl:ControlHelp("The maximum amount of time before a corpse is removed. Set to -1 to disable") pnl:NumSlider("Max distance between player", "zcnpci_max_corpse_distance", -1, 32768, 2) pnl:ControlHelp("If the corpse is further than this distance, it will be removed. Set to -1 to disable") pnl:CheckBox("Never remove corpses near the player", "zcnpci_disable_corpse_removal_near_player") pnl:ControlHelp("If on, corpses under the variable above in distance will never be cleared.") pnl:CheckBox("Treat crippled NPCs as dead", "zcnpci_treat_crippled_as_dead") pnl:ControlHelp("If on, corpses with amputations or both legs broken will be clearable.") pnl:CheckBox("Treat near-death NPCs as dead", "zcnpci_treat_near_death_as_dead") pnl:ControlHelp("If on, corpses near death (severe blood loss, comas, etc.) will be clearable.") end if engine.ActiveGamemode() == "sandbox" then hook.Add("AddToolMenuCategories", "ZCNPCICategory", function() spawnmenu.AddToolCategory("Utilities", "zcnpci", "Z-City NPCi") end) hook.Add("PopulateToolMenu", "ZCNPCIMenuSettings", function() spawnmenu.AddToolMenuOption("Utilities", "zcnpci", "RagdollSettings", "Ragdoll", "", "", function(pnl) pnl:ClearControls() PopulateRagdollSBXToolMenu(pnl) end) spawnmenu.AddToolMenuOption("Utilities", "zcnpci", "PerformanceSettings", "Performance", "", "", function(pnl) pnl:ClearControls() PopulatePerformanceSBXToolMenu(pnl) end) end) end