datae you are moron

This commit is contained in:
Jonny_Bro (Nikita) 2023-09-03 20:33:25 +05:00
parent 519a16cd50
commit e90e501a9e
12 changed files with 54 additions and 62 deletions

View file

@ -383,7 +383,7 @@ function SWEP:OnRemove()
end end
function SWEP:Reload() function SWEP:Reload()
if GetGlobalBool(GM_DATATHEFT) or GetGlobalBool(GM_DEATHMATCH) then return end if GetGlobalBool("GM_DATATHEFT") or GetGlobalBool("GM_DEATHMATCH") or GetGlobalBool("GM_INFECTION") then return end
if not TUTORIALMODE and CurTime() > self.RespawnDelay and self:GetOwner():GetClimbing() == 0 and not IsValid(self:GetOwner():GetSwingbar()) and not self:GetOwner().BuildMode then if not TUTORIALMODE and CurTime() > self.RespawnDelay and self:GetOwner():GetClimbing() == 0 and not IsValid(self:GetOwner():GetSwingbar()) and not self:GetOwner().BuildMode then
self:GetOwner():Spawn() self:GetOwner():Spawn()
@ -480,7 +480,7 @@ function SWEP:PrimaryAttack()
local ent = tr_result.Entity local ent = tr_result.Entity
if SERVER and IsValid(ent) then if SERVER and IsValid(ent) then
if not ply:IsPlayer() or (Course_Name == "" and not GetGlobalBool(GM_INFECTION)) then if not ply:IsPlayer() or (Course_Name == "" and not GetGlobalBool("GM_INFECTION")) then
local d = DamageInfo() local d = DamageInfo()
d:SetDamage((punch ~= 3 and 10) or 20) d:SetDamage((punch ~= 3 and 10) or 20)
d:SetAttacker(ply) d:SetAttacker(ply)

View file

@ -281,7 +281,7 @@ local function sortleaderboard(a, b)
local atime = a:GetNW2Float("PBTime") local atime = a:GetNW2Float("PBTime")
local btime = b:GetNW2Float("PBTime") local btime = b:GetNW2Float("PBTime")
if GetGlobalBool(GM_INFECTION) then if GetGlobalBool("GM_INFECTION") then
if atime == 0 then if atime == 0 then
atime = -1 atime = -1
end end
@ -291,7 +291,7 @@ local function sortleaderboard(a, b)
end end
return atime > btime return atime > btime
elseif GetGlobalBool(GM_DATATHEFT) then elseif GetGlobalBool("GM_DATATHEFT") then
atime = a:GetNW2Int("DataBanked", 0) atime = a:GetNW2Int("DataBanked", 0)
btime = b:GetNW2Int("DataBanked", 0) btime = b:GetNW2Int("DataBanked", 0)
@ -304,7 +304,7 @@ local function sortleaderboard(a, b)
end end
return atime > btime return atime > btime
elseif GetGlobalBool(GM_DEATHMATCH) then elseif GetGlobalBool("GM_DEATHMATCH") then
atime = a:GetNW2Int("DeathmatchKills", 0) atime = a:GetNW2Int("DeathmatchKills", 0)
btime = b:GetNW2Int("DeathmatchKills", 0) btime = b:GetNW2Int("DeathmatchKills", 0)
@ -331,11 +331,11 @@ local function sortleaderboard(a, b)
end end
function BeatrunLeaderboard(forced) function BeatrunLeaderboard(forced)
if not forced and Course_Name == "" and not GetGlobalBool(GM_INFECTION) and not GetGlobalBool(GM_DATATHEFT) and not GetGlobalBool(GM_DEATHMATCH) then return end if not forced and Course_Name == "" and not GetGlobalBool("GM_INFECTION") and not GetGlobalBool("GM_DATATHEFT") and not GetGlobalBool("GM_DEATHMATCH") then return end
local isinfection = GetGlobalBool(GM_INFECTION) local isinfection = GetGlobalBool("GM_INFECTION")
local isdatatheft = GetGlobalBool(GM_DATATHEFT) local isdatatheft = GetGlobalBool("GM_DATATHEFT")
local isdeathmatch = GetGlobalBool(GM_DEATHMATCH) local isdeathmatch = GetGlobalBool("GM_DEATHMATCH")
local ply = LocalPlayer() local ply = LocalPlayer()
local vp = ply:GetViewPunchAngles() local vp = ply:GetViewPunchAngles()
local scrh = ScrH() local scrh = ScrH()

View file

@ -4,13 +4,13 @@ local enemy = Color(255, 0, 0)
local function HideNearby(ply) local function HideNearby(ply)
if ply == LocalPlayer() then return end if ply == LocalPlayer() then return end
if GetGlobalBool(GM_DATATHEFT) or GetGlobalBool(GM_DEATHMATCH) then return end if GetGlobalBool("GM_DATATHEFT") or GetGlobalBool("GM_DEATHMATCH") then return end
ply.distfromlocal = LocalPlayer():GetPos():Distance(ply:GetPos()) ply.distfromlocal = LocalPlayer():GetPos():Distance(ply:GetPos())
local Distance = ply.distfromlocal or 40000 local Distance = ply.distfromlocal or 40000
if Distance < 20000 and NametagsEnable:GetBool() then if Distance < 20000 and NametagsEnable:GetBool() then
local infectionmode = GetGlobalBool(GM_INFECTION) local infectionmode = GetGlobalBool("GM_INFECTION")
local localinfected = LocalPlayer():GetNW2Bool("Infected") local localinfected = LocalPlayer():GetNW2Bool("Infected")
local plyinfected = ply:GetNW2Bool("Infected") local plyinfected = ply:GetNW2Bool("Infected")
local ang = LocalPlayer():EyeAngles() local ang = LocalPlayer():EyeAngles()

View file

@ -300,7 +300,7 @@ hook.Add("PopulateToolMenu", "Beatrun_ToolMenu", function()
InfectionButton:SetText("Toggle Infection Gamemode") InfectionButton:SetText("Toggle Infection Gamemode")
InfectionButton:SetSize(0, 20) InfectionButton:SetSize(0, 20)
InfectionButton.DoClick = function() InfectionButton.DoClick = function()
if GetGlobalBool(GM_DEATHMATCH) or GetGlobalBool(GM_DATATHEFT) then if GetGlobalBool("GM_DEATHMATCH") or GetGlobalBool("GM_DATATHEFT") then
InfectionButton:SetText("Another gamemode is running!") InfectionButton:SetText("Another gamemode is running!")
timer.Simple(2, function() timer.Simple(2, function()
InfectionButton:SetText("Toggle Infection Gamemode") InfectionButton:SetText("Toggle Infection Gamemode")
@ -316,7 +316,7 @@ hook.Add("PopulateToolMenu", "Beatrun_ToolMenu", function()
DatatheftButton:SetText("Toggle Data Theft Gamemode") DatatheftButton:SetText("Toggle Data Theft Gamemode")
DatatheftButton:SetSize(0, 20) DatatheftButton:SetSize(0, 20)
DatatheftButton.DoClick = function() DatatheftButton.DoClick = function()
if GetGlobalBool(GM_INFECTION) or GetGlobalBool(GM_DEATHMATCH) then if GetGlobalBool("GM_INFECTION") or GetGlobalBool("GM_DEATHMATCH") then
DatatheftButton:SetText("Another gamemode is running!") DatatheftButton:SetText("Another gamemode is running!")
timer.Simple(2, function() timer.Simple(2, function()
DatatheftButton:SetText("Toggle Data Theft Gamemode") DatatheftButton:SetText("Toggle Data Theft Gamemode")
@ -332,7 +332,7 @@ hook.Add("PopulateToolMenu", "Beatrun_ToolMenu", function()
DeathmatchButton:SetText("Toggle Deathmatch Gamemode") DeathmatchButton:SetText("Toggle Deathmatch Gamemode")
DeathmatchButton:SetSize(0, 20) DeathmatchButton:SetSize(0, 20)
DeathmatchButton.DoClick = function() DeathmatchButton.DoClick = function()
if GetGlobalBool(GM_INFECTION) or GetGlobalBool(GM_DATATHEFT) then if GetGlobalBool("GM_INFECTION") or GetGlobalBool("GM_DATATHEFT") then
DeathmatchButton:SetText("Another gamemode is running!") DeathmatchButton:SetText("Another gamemode is running!")
timer.Simple(2, function() timer.Simple(2, function()
DeathmatchButton:SetText("Toggle Deathmatch Gamemode") DeathmatchButton:SetText("Toggle Deathmatch Gamemode")

View file

@ -11,23 +11,14 @@ end
local PLAYER = {} local PLAYER = {}
PLAYER.DuckSpeed = 0.01 -- How fast to go from not ducking, to ducking PLAYER.DuckSpeed = 0.01 -- How fast to go from not ducking, to ducking
PLAYER.UnDuckSpeed = 0.01 -- How fast to go from ducking, to not ducking PLAYER.UnDuckSpeed = 0.01 -- How fast to go from ducking, to not ducking
--
-- Creates a Taunt Camera
--
PLAYER.TauntCam = TauntCamera() PLAYER.TauntCam = TauntCamera()
--
-- See gamemodes/base/player_class/player_default.lua for all overridable variables
--
PLAYER.WalkSpeed = 200 PLAYER.WalkSpeed = 200
PLAYER.RunSpeed = 400 PLAYER.RunSpeed = 400
--
-- Set up the network table accessors
--
function PLAYER:SetupDataTables() function PLAYER:SetupDataTables()
BaseClass.SetupDataTables(self) BaseClass.SetupDataTables(self)
self.Player:NetworkVar("Float", 0, "MEMoveLimit") self.Player:NetworkVar("Float", 0, "MEMoveLimit")
@ -130,8 +121,8 @@ function PLAYER:SetupDataTables()
end end
function PLAYER:Loadout() function PLAYER:Loadout()
if GetGlobalBool(GM_DATATHEFT) or GetGlobalBool(GM_DEATHMATCH) then if GetGlobalBool("GM_DATATHEFT") or GetGlobalBool("GM_DEATHMATCH") then
for k, v in ipairs(DATATHEFT_LOADOUTS[math.random(#DATATHEFT_LOADOUTS)]) do for _, v in ipairs(DATATHEFT_LOADOUTS[math.random(#DATATHEFT_LOADOUTS)]) do
local wep = self.Player:Give(v) local wep = self.Player:Give(v)
self.Player:GiveAmmo(1000, wep:GetPrimaryAmmoType()) self.Player:GiveAmmo(1000, wep:GetPrimaryAmmoType())
end end
@ -174,9 +165,6 @@ function PLAYER:SetModel()
end end
end end
--
-- Called when the player spawns
--
if SERVER then if SERVER then
util.AddNetworkString("BeatrunSpawn") util.AddNetworkString("BeatrunSpawn")
end end
@ -245,7 +233,7 @@ function PLAYER:Spawn()
ply:SetCustomCollisionCheck(true) ply:SetCustomCollisionCheck(true)
if GetGlobalBool(GM_DATATHEFT) then if GetGlobalBool("GM_DATATHEFT") then
ply:DataTheft_Bank() ply:DataTheft_Bank()
end end
@ -267,7 +255,7 @@ function PLAYER:Spawn()
end end
hook.Add("IsSpawnpointSuitable", "CheckSpawnPoint", function(ply, spawnpointent, bMakeSuitable) hook.Add("IsSpawnpointSuitable", "CheckSpawnPoint", function(ply, spawnpointent, bMakeSuitable)
if not GetGlobalBool(GM_DATATHEFT) then return end if not GetGlobalBool("GM_DATATHEFT") or not GetGlobalBool("GM_DEATHMATCH") then return end
local pos = spawnpointent:GetPos() local pos = spawnpointent:GetPos()

View file

@ -8,7 +8,7 @@ if SERVER then
util.AddNetworkString("DataTheft_Sync") util.AddNetworkString("DataTheft_Sync")
function Beatrun_StartDataTheft() function Beatrun_StartDataTheft()
SetGlobalBool(GM_DATATHEFT, true) SetGlobalBool("GM_DATATHEFT", true)
net.Start("DataTheft_Start") net.Start("DataTheft_Start")
net.Broadcast() net.Broadcast()
@ -32,9 +32,11 @@ if SERVER then
end end
function Beatrun_StopDataTheft() function Beatrun_StopDataTheft()
SetGlobalBool(GM_DATATHEFT, false) SetGlobalBool("GM_DATATHEFT", false)
for _, v in ipairs(player.GetAll()) do for _, v in ipairs(player.GetAll()) do
v:SetNW2Int("DataCubes", 0)
v:StripWeapons() v:StripWeapons()
v:StripAmmo() v:StripAmmo()
v:Give("runnerhands") v:Give("runnerhands")
@ -42,7 +44,7 @@ if SERVER then
end end
local function DataTheftSync(ply) local function DataTheftSync(ply)
if GetGlobalBool(GM_DATATHEFT) and not ply.DataTheftSynced then if GetGlobalBool("GM_DATATHEFT") and not ply.DataTheftSynced then
net.Start("DataTheft_Sync") net.Start("DataTheft_Sync")
net.Send(ply) net.Send(ply)
@ -53,7 +55,7 @@ if SERVER then
hook.Add("PlayerSpawn", "DataTheftSync", DataTheftSync) hook.Add("PlayerSpawn", "DataTheftSync", DataTheftSync)
local function DataTheftDeath(ply, inflictor, attacker) local function DataTheftDeath(ply, inflictor, attacker)
if GetGlobalBool(GM_DATATHEFT) then if GetGlobalBool("GM_DATATHEFT") then
local datacount = ply:GetNW2Int("DataCubes", 0) local datacount = ply:GetNW2Int("DataCubes", 0)
if datacount > 0 then if datacount > 0 then
@ -82,7 +84,7 @@ end
if CLIENT then if CLIENT then
local function DataTheftHUDName() local function DataTheftHUDName()
if GetGlobalBool(GM_DATATHEFT) then if GetGlobalBool("GM_DATATHEFT") then
local datacubes = LocalPlayer():GetNW2Int("DataCubes", 0) local datacubes = LocalPlayer():GetNW2Int("DataCubes", 0)
return "Data Theft (" .. datacubes .. ")" return "Data Theft (" .. datacubes .. ")"

View file

@ -5,7 +5,7 @@ if SERVER then
util.AddNetworkString("Deathmatch_Sync") util.AddNetworkString("Deathmatch_Sync")
function Beatrun_StartDeathmatch() function Beatrun_StartDeathmatch()
SetGlobalBool(GM_DEATHMATCH, true) SetGlobalBool("GM_DEATHMATCH", true)
net.Start("Deathmatch_Start") net.Start("Deathmatch_Start")
net.Broadcast() net.Broadcast()
@ -24,9 +24,11 @@ if SERVER then
end end
function Beatrun_StopDeathmatch() function Beatrun_StopDeathmatch()
SetGlobalBool(GM_DEATHMATCH, false) SetGlobalBool("GM_DEATHMATCH", false)
for _, v in ipairs(player.GetAll()) do for _, v in ipairs(player.GetAll()) do
v:SetNW2Int("DeathmatchKills", 0)
v:StripWeapons() v:StripWeapons()
v:StripAmmo() v:StripAmmo()
v:Give("runnerhands") v:Give("runnerhands")
@ -34,7 +36,7 @@ if SERVER then
end end
local function DeathmatchSync(ply) local function DeathmatchSync(ply)
if GetGlobalBool(GM_DEATHMATCH) and not ply.DeathmatchSynced then if GetGlobalBool("GM_DEATHMATCH") and not ply.DeathmatchSynced then
net.Start("Deathmatch_Sync") net.Start("Deathmatch_Sync")
net.Send(ply) net.Send(ply)
@ -45,7 +47,7 @@ if SERVER then
hook.Add("PlayerSpawn", "DeathmatchSync", DeathmatchSync) hook.Add("PlayerSpawn", "DeathmatchSync", DeathmatchSync)
local function DeathmatchDeath(ply, inflictor, attacker) local function DeathmatchDeath(ply, inflictor, attacker)
if GetGlobalBool(GM_DEATHMATCH) then if GetGlobalBool("GM_DEATHMATCH") then
local plyKills = ply:GetNW2Int("DeathmatchKills", 0) local plyKills = ply:GetNW2Int("DeathmatchKills", 0)
if ply == attacker then if ply == attacker then
@ -63,7 +65,7 @@ end
if CLIENT then if CLIENT then
local function DeathmatchHUDName() local function DeathmatchHUDName()
if GetGlobalBool(GM_DEATHMATCH) then if GetGlobalBool("GM_DEATHMATCH") then
return "Deathmatch" return "Deathmatch"
else else
hook.Remove("BeatrunHUDCourse", "DeathmatchHUDName") hook.Remove("BeatrunHUDCourse", "DeathmatchHUDName")

View file

@ -14,7 +14,7 @@ if CLIENT then
if IsValid(activewep) and activewep:GetClass() ~= "runnerhands" then return end if IsValid(activewep) and activewep:GetClass() ~= "runnerhands" then return end
if ply:GetMoveType() == MOVETYPE_NOCLIP then return end if ply:GetMoveType() == MOVETYPE_NOCLIP then return end
if GetGlobalBool(GM_INFECTION) or GetGlobalBool(GM_DATATHEFT) or GetGlobalBool(GM_DEATHMATCH) then return end if GetGlobalBool("GM_INFECTION") or GetGlobalBool("GM_DATATHEFT") or GetGlobalBool("GM_DEATHMATCH") then return end
if not ply.GrappleHUD_tr then if not ply.GrappleHUD_tr then
ply.GrappleHUD_tr = {} ply.GrappleHUD_tr = {}
@ -58,7 +58,7 @@ hook.Add("SetupMove", "Grapple", function(ply, mv, cmd)
if ply:GetMantle() ~= 0 or ply:GetClimbing() ~= 0 then return end if ply:GetMantle() ~= 0 or ply:GetClimbing() ~= 0 then return end
if ply:GetInfoNum("Beatrun_DisableGrapple", 0) == 1 and Course_Name == "" then return end if ply:GetInfoNum("Beatrun_DisableGrapple", 0) == 1 and Course_Name == "" then return end
if not ply:Alive() or Course_Name ~= "" and ply:GetNW2Int("CPNum", 1) ~= -1 and not ply:GetNW2Entity("Swingrope"):IsValid() then return end if not ply:Alive() or Course_Name ~= "" and ply:GetNW2Int("CPNum", 1) ~= -1 and not ply:GetNW2Entity("Swingrope"):IsValid() then return end
if GetGlobalBool(GM_INFECTION) or GetGlobalBool(GM_DATATHEFT) or GetGlobalBool(GM_DEATHMATCH) and not ply:GetNW2Entity("Swingrope"):IsValid() then return end if GetGlobalBool("GM_INFECTION") or GetGlobalBool("GM_DATATHEFT") or GetGlobalBool("GM_DEATHMATCH") and not ply:GetNW2Entity("Swingrope"):IsValid() then return end
local activewep = ply:GetActiveWeapon() local activewep = ply:GetActiveWeapon()
local usingrh = IsValid(activewep) and activewep:GetClass() == "runnerhands" local usingrh = IsValid(activewep) and activewep:GetClass() == "runnerhands"

View file

@ -84,7 +84,7 @@ if SERVER then
ended = true ended = true
timer.Simple(15, function() timer.Simple(15, function()
if ended and GetGlobalBool(GM_INFECTION) then if ended and GetGlobalBool("GM_INFECTION") then
Beatrun_StartInfection() Beatrun_StartInfection()
end end
end) end)
@ -95,7 +95,7 @@ if SERVER then
end) end)
local function InfectionSync(ply) local function InfectionSync(ply)
if GetGlobalBool(GM_INFECTION) and not ply.InfectionSynced then if GetGlobalBool("GM_INFECTION") and not ply.InfectionSynced then
net.Start("Infection_Sync") net.Start("Infection_Sync")
net.WriteFloat(Infection_StartTime) net.WriteFloat(Infection_StartTime)
net.WriteFloat(Infection_EndTime) net.WriteFloat(Infection_EndTime)
@ -108,7 +108,7 @@ if SERVER then
hook.Add("PlayerSpawn", "InfectionSync", InfectionSync) hook.Add("PlayerSpawn", "InfectionSync", InfectionSync)
function Beatrun_StopInfection() function Beatrun_StopInfection()
SetGlobalBool(GM_INFECTION, false) SetGlobalBool("GM_INFECTION", false)
local players = player.GetAll() local players = player.GetAll()
@ -154,7 +154,7 @@ if SERVER then
end end
local function InfectionTimer() local function InfectionTimer()
if not GetGlobalBool(GM_INFECTION) then return end if not GetGlobalBool("GM_INFECTION") then return end
if player.GetCount() <= 1 then if player.GetCount() <= 1 then
Beatrun_StopInfection() Beatrun_StopInfection()
@ -199,7 +199,7 @@ if SERVER then
ended = true ended = true
timer.Simple(15, function() timer.Simple(15, function()
if ended and GetGlobalBool(GM_INFECTION) then if ended and GetGlobalBool("GM_INFECTION") then
Beatrun_StartInfection() Beatrun_StartInfection()
end end
end) end)
@ -207,7 +207,7 @@ if SERVER then
end end
function Beatrun_StartInfection() function Beatrun_StartInfection()
if GetGlobalBool(GM_INFECTION) and not ended then return end if GetGlobalBool("GM_INFECTION") and not ended then return end
if Course_Name ~= "" then return end if Course_Name ~= "" then return end
if player.GetCount() < 2 then return end if player.GetCount() < 2 then return end
@ -215,7 +215,7 @@ if SERVER then
net.WriteFloat(CurTime()) net.WriteFloat(CurTime())
net.Broadcast() net.Broadcast()
SetGlobalBool(GM_INFECTION, true) SetGlobalBool("GM_INFECTION", true)
revealed = false revealed = false
ended = false ended = false
@ -247,7 +247,7 @@ if SERVER then
end end
function InfectionDeath(ply) function InfectionDeath(ply)
if not GetGlobalBool(GM_INFECTION) then return end if not GetGlobalBool("GM_INFECTION") then return end
if revealed and Infection_StartTime < CurTime() and not ply:GetNW2Bool("Infected") then if revealed and Infection_StartTime < CurTime() and not ply:GetNW2Bool("Infected") then
if ply.InfectionWuzHere then if ply.InfectionWuzHere then
@ -274,7 +274,7 @@ if SERVER then
ended = true ended = true
timer.Simple(15, function() timer.Simple(15, function()
if ended and GetGlobalBool(GM_INFECTION) then if ended and GetGlobalBool("GM_INFECTION") then
Beatrun_StartInfection() Beatrun_StartInfection()
end end
end) end)
@ -306,7 +306,7 @@ if CLIENT then
local noclipkey = 0 local noclipkey = 0
local function InfectionHUDName() local function InfectionHUDName()
if GetGlobalBool(GM_INFECTION) then if GetGlobalBool("GM_INFECTION") then
local team = LocalPlayer():GetNW2Bool("Infected") and "(Infected)" or "(Human)" local team = LocalPlayer():GetNW2Bool("Infected") and "(Infected)" or "(Human)"
return "Infection " .. team return "Infection " .. team
@ -322,7 +322,7 @@ if CLIENT then
end end
local function InfectionCalcView(ply, pos, ang) local function InfectionCalcView(ply, pos, ang)
if GetGlobalBool(GM_INFECTION) then if GetGlobalBool("GM_INFECTION") then
local keydown = input.IsKeyDown(noclipkey) local keydown = input.IsKeyDown(noclipkey)
if keydown then if keydown then
@ -447,7 +447,7 @@ if CLIENT then
end) end)
local function InfectionHUD() local function InfectionHUD()
if not GetGlobalBool(GM_INFECTION) then return end if not GetGlobalBool("GM_INFECTION") then return end
surface.SetTextColor(color_white) surface.SetTextColor(color_white)
surface.SetFont("BeatrunHUD") surface.SetFont("BeatrunHUD")
@ -484,7 +484,7 @@ if CLIENT then
end) end)
local function BeatrunInfectedVision() local function BeatrunInfectedVision()
if GetGlobalBool(GM_INFECTION) and LocalPlayer():GetNW2Bool("Infected") then if GetGlobalBool("GM_INFECTION") and LocalPlayer():GetNW2Bool("Infected") then
tab["$pp_colour_colour"] = CurTime() > (LocalPlayer().InfectionTouchDelay or 0) and 0.91 or 0.1 tab["$pp_colour_colour"] = CurTime() > (LocalPlayer().InfectionTouchDelay or 0) and 0.91 or 0.1
DrawColorModify(tab) DrawColorModify(tab)
end end

View file

@ -189,7 +189,7 @@ local function MeleeThink(ply, mv, cmd)
local ent = tr_result.Entity local ent = tr_result.Entity
if SERVER and IsValid(ent) and (not ent:IsPlayer() or Course_Name == "" and not GetGlobalBool(GM_INFECTION) and GetConVar("sbox_playershurtplayers"):GetBool()) then if SERVER and IsValid(ent) and (not ent:IsPlayer() or Course_Name == "" and not GetGlobalBool("GM_INFECTION") and GetConVar("sbox_playershurtplayers"):GetBool()) then
local d = DamageInfo() local d = DamageInfo()
d:SetDamage(meleedata[ply:GetMelee()][6]) d:SetDamage(meleedata[ply:GetMelee()][6])
d:SetAttacker(ply) d:SetAttacker(ply)

View file

@ -36,7 +36,7 @@ hook.Add("PlayerNoClip", "BlockNoClip", function(ply, enabled)
end end
end end
if enabled and (GetGlobalBool(GM_INFECTION) or GetGlobalBool(GM_DATATHEFT) or GetGlobalBool(GM_DEATHMATCH)) then return false end if enabled and (GetGlobalBool("GM_INFECTION") or GetGlobalBool("GM_DATATHEFT") or GetGlobalBool("GM_DEATHMATCH")) then return false end
end) end)
function ParkourEvent(event, ply, ignorepred) function ParkourEvent(event, ply, ignorepred)

View file

@ -6,19 +6,19 @@ net.Receive("Beatrun_ToggleGamemode", function(_, ply)
local gm = net.ReadString() local gm = net.ReadString()
if gm == "datatheft" then if gm == "datatheft" then
if not GetGlobalBool(GM_DATATHEFT) then if not GetGlobalBool("GM_DATATHEFT") then
Beatrun_StartDataTheft() Beatrun_StartDataTheft()
else else
Beatrun_StopDataTheft() Beatrun_StopDataTheft()
end end
elseif gm == "infection" then elseif gm == "infection" then
if not GetGlobalBool(GM_INFECTION) then if not GetGlobalBool("GM_INFECTION") then
Beatrun_StartInfection() Beatrun_StartInfection()
else else
Beatrun_StopInfection() Beatrun_StopInfection()
end end
elseif gm == "deathmatch" then elseif gm == "deathmatch" then
if not GetGlobalBool(GM_DEATHMATCH) then if not GetGlobalBool("GM_DEATHMATCH") then
Beatrun_StartDeathmatch() Beatrun_StartDeathmatch()
else else
Beatrun_StopDeathmatch() Beatrun_StopDeathmatch()