local function a(ply, weapon)
local b = weapon:GetClass()
if weapon:GetSlot() == 2 and IsValid(ply:GetWeapon("weapon_ar")) then
return false
end
if weapon:GetSlot() == 1 and IsValid(ply:GetWeapon("weapon_pistol")) then
return false
end
return true
end
hook.Add("PlayerCanPickupWeapon", "RestrictWeapons", function(ply, weapon)
return a(ply, weapon)
end)
hook.Add("PlayerSwitchWeapon", "RestrictWeapons", function(ply, oldWeapon, newWeapon)
if not a(ply, newWeapon) then
return true
end
end)