mirror of
https://github.com/CapsAdmin/pac3.git
synced 2025-03-04 03:03:01 -05:00
Add force onuse
server option
This commit is contained in:
parent
2bb09cde8a
commit
073d76737c
@ -575,9 +575,18 @@ function pac.FlashlightDisable(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 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_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
|
||||
|
1
lua/pac3/core/server/convars.lua
Normal file
1
lua/pac3/core/server/convars.lua
Normal file
@ -0,0 +1 @@
|
||||
CreateConVar("pac_onuse_only_force", "0", FCVAR_ARCHIVE + FCVAR_REPLICATED , "Forces the default for onuse to be ON on players that have not enabled the override.")
|
@ -11,6 +11,7 @@ CreateConVar('pac_allow_mdl', '1', CLIENT and {FCVAR_REPLICATED} or {FCVAR_ARCHI
|
||||
CreateConVar('pac_allow_mdl_entity', '1', CLIENT and {FCVAR_REPLICATED} or {FCVAR_ARCHIVE, FCVAR_REPLICATED}, 'Allow to use custom MDLs as Entity')
|
||||
|
||||
include("util.lua")
|
||||
include("convars.lua")
|
||||
|
||||
include("pac3/core/shared/init.lua")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user