Move code to more appropriate files

This commit is contained in:
Redox 2022-11-21 13:07:43 +01:00
parent af3b025c05
commit f2bdc17401
No known key found for this signature in database
GPG Key ID: C10A433A95068388
3 changed files with 18 additions and 17 deletions

View File

@ -573,20 +573,3 @@ end
function pac.FlashlightDisable(b)
pac.flashlight_disabled = b
end
local pacOnUseConvar = CreateClientConVar("pac_onuse_only", "0", true, false, 'Enable "on +use only" mode. Within this mode, outfits are not being actually "loaded" until you hover over player and press your use button')
local pacOnUseOverrideConvar = CreateClientConVar("pac_onuse_only_override", "0", true, false, 'Overrides the server default "on +use only" mode. This is useful if you want to enable "on +use only" mode on servers that have it disabled')
local pacOnUseForceConvar = CreateConVar("pac_onuse_only_force", "0", FCVAR_REPLICATED, 'Forces the default for onuse to be ON on players that have not enabled the override.')
function pac.IsPacOnUseOnly()
local clientConvarBool = pacOnUseConvar:GetBool()
if pacOnUseForceConvar:GetBool() then
if pacOnUseOverrideConvar:GetBool() then
return false
end
return true
end
return clientConvarBool
end

View File

@ -1,5 +1,23 @@
local L = pace.LanguageString
local MAX_DIST = 270
local pacOnUseConvar = CreateClientConVar("pac_onuse_only", "0", true, false, 'Enable "on +use only" mode. Within this mode, outfits are not being actually "loaded" until you hover over player and press your use button')
local pacOnUseOverrideConvar = CreateClientConVar("pac_onuse_only_override", "0", true, false, 'Overrides the server default "on +use only" mode. This is useful if you want to enable "on +use only" mode on servers that have it disabled')
local pacOnUseForceConvar = CreateConVar("pac_onuse_only_force", "0", FCVAR_REPLICATED, 'Forces the default for onuse to be ON on players that have not enabled the override.')
function pac.IsPacOnUseOnly()
local clientConvarBool = pacOnUseConvar:GetBool()
if pacOnUseForceConvar:GetBool() then
if pacOnUseOverrideConvar:GetBool() then
return false
end
return true
end
return clientConvarBool
end
local pac_IsPacOnUseOnly = pac.IsPacOnUseOnly
hook.Add("PlayerBindPress", "pac_onuse_only", function(ply, bind, isPressed)