Added a checkbox for random loadouts in tools menu

This commit is contained in:
Jonny_Bro (Nikita) 2024-05-28 21:13:10 +05:00
parent 97053df95e
commit 8ffcfa1e39
No known key found for this signature in database
GPG key ID: 3F1ECC04147E9BD8
4 changed files with 8 additions and 3 deletions

View file

@ -241,4 +241,5 @@ beatrun.infection.awardinfected=You were awarded 100 XP for spawning as an infec
beatrun.infection.end=The game has ended!\nSurvivors: %s\nRestarting in 15s beatrun.infection.end=The game has ended!\nSurvivors: %s\nRestarting in 15s
# Server ConVars # Server ConVars
beatrun.randomloadouts.helptext=Toggles random MW Base loadouts in Deathmatch and DataTheft beatrun.randommwloadouts=Random MW Base Loadouts
beatrun.randommwloadoutsdesc=Toggles random MW Base loadouts in Deathmatch and DataTheft

View file

@ -241,4 +241,5 @@ beatrun.infection.awardinfected=Вы получили 100 XP за спавн з
beatrun.infection.end=Игра окончена!\nВыжившие: %s\nПерезапуск через 15 сек beatrun.infection.end=Игра окончена!\nВыжившие: %s\nПерезапуск через 15 сек
# Server ConVars # Server ConVars
beatrun.randomloadouts.helptext=Переключает случайные наборы оружия MW Base в Deathmatch и DataTheft beatrun.randommwloadouts=Случайные наборы оружия MW Base
beatrun.randommwloadoutsdesc=Переключает случайные наборы оружия MW Base в Deathmatch и DataTheft

View file

@ -334,6 +334,9 @@ hook.Add("PopulateToolMenu", "Beatrun_ToolMenu", function()
end end
panel:AddItem(InfectionButton) panel:AddItem(InfectionButton)
panel:CheckBox("#beatrun.randommwloadouts", "Beatrun_RandomMWLoadoutsqw")
panel:ControlHelp("#beatrun.randommwloadoutsdesc")
local DatatheftButton = vgui.Create("DButton", panel) local DatatheftButton = vgui.Create("DButton", panel)
DatatheftButton:SetText("#beatrun.toolsmenu.gamemodes.datatheft") DatatheftButton:SetText("#beatrun.toolsmenu.gamemodes.datatheft")
DatatheftButton:SetSize(0, 20) DatatheftButton:SetSize(0, 20)

View file

@ -2,7 +2,7 @@ if SERVER then
util.AddNetworkString("Deathmatch_Start") util.AddNetworkString("Deathmatch_Start")
util.AddNetworkString("Deathmatch_Sync") util.AddNetworkString("Deathmatch_Sync")
CreateConVar("Beatrun_RandomMWLoadouts", 0, {FCVAR_REPLICATED, FCVAR_ARCHIVE}, "#beatrun.randomloadouts.helptext") CreateConVar("Beatrun_RandomMWLoadouts", 0, {FCVAR_REPLICATED, FCVAR_ARCHIVE})
function getRandomMGBaseWeapon() function getRandomMGBaseWeapon()
local allWep = weapons.GetList() local allWep = weapons.GetList()