Skip to content

Commit

Permalink
Optimize warn
Browse files Browse the repository at this point in the history
  • Loading branch information
Denneisk committed Dec 11, 2023
1 parent d0cbe42 commit 9644310
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/entities/gmod_wire_expression2/core/cl_debug.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CreateClientConVar( "wire_expression2_print_max_length", 1000, true, true )
CreateClientConVar( "wire_expression2_print_delay", 0.3, true, true )
local cvar_warn = CreateClientConVar("wire_expression2_printcolor_warn", 1, true, true, "Shows a warning when someone uses printColorDriver on you")

local not_warned = true
local not_warned = not game.SinglePlayer()

local RED = Color(255, 0, 0)

Expand Down Expand Up @@ -34,7 +34,7 @@ net.Receive("wire_expression2_printColor", function()
else
if not_warned and ply ~= LocalPlayer() then
not_warned = false
if cvar_warn:GetBool() and not game.SinglePlayer() then
if cvar_warn:GetBool() then
chat.AddText(RED, "While in somone's seat/car/whatever, printColorDriver can be used to 100% realistically fake people talking, including admins.\
Don't trust a word you hear while in a seat after seeing this message!")
end
Expand Down

0 comments on commit 9644310

Please sign in to comment.