should fix server console spam

This commit is contained in:
Jonny_Bro (Nikita) 2024-01-03 18:23:50 +05:00
parent 22a64cde04
commit 920501b258
2 changed files with 4 additions and 4 deletions

View file

@ -24,7 +24,7 @@ if SERVER then
else else
for l, b in ipairs(DATATHEFT_LOADOUTS[math.random(#DATATHEFT_LOADOUTS)]) do for l, b in ipairs(DATATHEFT_LOADOUTS[math.random(#DATATHEFT_LOADOUTS)]) do
local wep = v:Give(b) local wep = v:Give(b)
v:GiveAmmo(1000, wep:GetPrimaryAmmoType()) v:GiveAmmo(9999, wep:GetPrimaryAmmoType())
end end
end end
end end

View file

@ -36,7 +36,7 @@ local function SafetyRollThink(ply, mv, cmd)
end end
end end
if ply:Alive() and ply:GetActiveWeapon():IsValid() and CurTime() > ply:GetSafetyRollTime() then if CLIENT and ply:Alive() and IsValid(ply:GetActiveWeapon()) and CurTime() > ply:GetSafetyRollTime() then
if weapons.IsBasedOn(ply:GetActiveWeapon():GetClass(), "mg_base") then if weapons.IsBasedOn(ply:GetActiveWeapon():GetClass(), "mg_base") then
RunConsoleCommand("mgbase_debug_vmrender", "1") RunConsoleCommand("mgbase_debug_vmrender", "1")
end end
@ -80,7 +80,7 @@ end)
hook.Add("SetupMove", "EvadeRoll", function(ply, mv, cmd) hook.Add("SetupMove", "EvadeRoll", function(ply, mv, cmd)
if ply:GetJumpTurn() and ply:OnGround() and mv:KeyPressed(IN_BACK) then if ply:GetJumpTurn() and ply:OnGround() and mv:KeyPressed(IN_BACK) then
if ply:Alive() and ply:GetActiveWeapon():IsValid() then if CLIENT and ply:Alive() and IsValid(ply:GetActiveWeapon()) then
if weapons.IsBasedOn(ply:GetActiveWeapon():GetClass(), "mg_base") then if weapons.IsBasedOn(ply:GetActiveWeapon():GetClass(), "mg_base") then
RunConsoleCommand("mgbase_debug_vmrender", "0") RunConsoleCommand("mgbase_debug_vmrender", "0")
end end
@ -140,7 +140,7 @@ hook.Add("OnPlayerHitGround", "SafetyRoll", function(ply, water, floater, speed)
ParkourEvent("roll", ply) ParkourEvent("roll", ply)
if ply:Alive() and ply:GetActiveWeapon():IsValid() then if CLIENT and ply:Alive() and IsValid(ply:GetActiveWeapon()) then
if weapons.IsBasedOn(ply:GetActiveWeapon():GetClass(), "mg_base") then if weapons.IsBasedOn(ply:GetActiveWeapon():GetClass(), "mg_base") then
RunConsoleCommand("mgbase_debug_vmrender", "0") RunConsoleCommand("mgbase_debug_vmrender", "0")
end end