diff --git a/gamemode/core/server/sv_player_voice.lua b/gamemode/core/server/sv_player_voice.lua new file mode 100644 index 0000000..54aa767 --- /dev/null +++ b/gamemode/core/server/sv_player_voice.lua @@ -0,0 +1,10 @@ +-- __ _ _______ _ __ +-- / / /\ | | |__ __| | | \ \ +-- / / / \ | |_ __ ___ | | ___ ___| |__ \ \ +-- < < / /\ \ | | '_ ` _ \| |/ _ \/ __| '_ \ > > +-- \ \ / ____ \| | | | | | | | __/ (__| | | | / / +-- \_\ /_/ \_\_|_| |_| |_|_|\___|\___|_| |_| /_/ + +function GM:PlayerCanHearPlayersVoice( lis, talk ) + if( lis:GetPos():Distance( talk:GetPos() ) > Quantum.Server.Settings.VoiceChatRange ) then return false, true end +end \ No newline at end of file diff --git a/gamemode/settings/sv_settings.lua b/gamemode/settings/sv_settings.lua index 42d374d..f684dcc 100644 --- a/gamemode/settings/sv_settings.lua +++ b/gamemode/settings/sv_settings.lua @@ -7,6 +7,8 @@ Quantum.Server.Settings = {} +Quantum.Server.Settings.VoiceChatRange = 400 + Quantum.Server.Settings.DamageScale = { -- The scale of the damage for each hitgroup [HITGROUP_HEAD] = 4, [HITGROUP_CHEST] = 2,