mirror of
https://github.com/Aaron113/urs.git
synced 2025-03-04 03:13:11 -05:00
More recoding bugs/tweaks
* Fixed weapon pickup restrictions * ulx_urs_weaponpickups defaulted to 2
This commit is contained in:
parent
317d5137f8
commit
cccc8b6b17
@ -14,7 +14,7 @@ URS.cfg.echoSpawns = 0
|
||||
URS.cfg.echoCommands = 0
|
||||
|
||||
if SERVER then
|
||||
URS.cfg.weaponPickups = ulx.convar("urs_weaponpickups", 0)
|
||||
URS.cfg.weaponPickups = ulx.convar("urs_weaponpickups", 2)
|
||||
URS.cfg.echoSpawns = ulx.convar("urs_echo_spawns", 1)
|
||||
URS.cfg.echoCommands = ulx.convar("urs_echo_commands", 1)
|
||||
|
||||
|
@ -30,6 +30,7 @@ function URS.Save(n)
|
||||
end
|
||||
|
||||
function URS.PrintRestricted(ply, type, what)
|
||||
if type == "pickup" then return end -- Constant spam
|
||||
if URS.cfg.echoSpawns then
|
||||
ulx.logSpawn(ply:Nick() .."<".. ply:SteamID() .."> spawned/used ".. type .." ".. what .." -=RESTRICTED=-")
|
||||
end
|
||||
@ -140,11 +141,11 @@ hook.Add( "PlayerGiveSWEP", "URSCheckRestrictedSWEP2", URS.CheckRestrictedSWEP,
|
||||
|
||||
function URS.CheckRestrictedPickUp(ply, weapon)
|
||||
if URS.cfg.weaponPickups:GetInt() == 2 then
|
||||
if !URS.Check( ply, "pickup", weapon:GetClass()) then
|
||||
if URS.Check( ply, "pickup", weapon:GetClass(), true) == false then
|
||||
return false
|
||||
end
|
||||
elseif URS.cfg.weaponPickups:GetInt() == 1 then
|
||||
if !URS.Check( ply, "swep", weapon:GetClass()) then
|
||||
if URS.Check( ply, "swep", weapon:GetClass()) == false then
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user