This commit is contained in:
lifestorm
2024-08-04 23:12:27 +03:00
parent 8064ba84d8
commit 9c918c46e5
7081 changed files with 2173485 additions and 14 deletions

View File

@@ -0,0 +1,36 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
if CLIENT then return end
hook.Add( "PlayerGiveSWEP", "ArcCW_YearLimiter", function( ply, class, swep )
local wep = weapons.Get(class)
if !ArcCW:WithinYearLimit(wep) then
ply:ChatPrint( wep.PrintName .. " is outside the year limit!")
return false
end
end )
function ArcCW:WithinYearLimit(wep)
if !wep then return true end
if !wep.ArcCW then return true end
if !ArcCW.ConVars["limityear_enable"]:GetBool() then return true end
local year = ArcCW.ConVars["limityear"]:GetInt()
if !wep.Trivia_Year then return true end
if !isnumber(wep.Trivia_Year) then return true end
if wep.Trivia_Year > year then return false end
return true
end