forked from sirpapate/playercore
Return early if the caller isn't valid
This commit is contained in:
parent
ab5da86232
commit
da7a73a070
@ -22,13 +22,15 @@ E2Helper.Descriptions["plyGetSpeed"] = "Gets the speed of the player."
|
||||
local plys = {}
|
||||
net.Receive("wire_expression2_playercore_sendmessage", function( len, ply )
|
||||
local ply = net.ReadEntity()
|
||||
if not IsValid( ply ) then return end
|
||||
|
||||
if ply and not plys[ply] then
|
||||
plys[ply] = true
|
||||
-- printColorDriver is used for the first time on us by this chip
|
||||
WireLib.AddNotify(msg1, NOTIFY_GENERIC, 7, NOTIFYSOUND_DRIP3)
|
||||
WireLib.AddNotify(msg2, NOTIFY_GENERIC, 7)
|
||||
chat.AddText(Color(255, 50, 50),"After this message, ", ply, " can send you a 100% realistically fake people talking, including admins.")
|
||||
chat.AddText(Color(255, 50, 50),"Look the console to see if the message is form an expression2")
|
||||
plys[ply] = true
|
||||
-- printColorDriver is used for the first time on us by this chip
|
||||
WireLib.AddNotify(msg1, NOTIFY_GENERIC, 7, NOTIFYSOUND_DRIP3)
|
||||
WireLib.AddNotify(msg2, NOTIFY_GENERIC, 7)
|
||||
chat.AddText(Color(255, 50, 50),"After this message, ", ply, " can send you a 100% realistically fake people talking, including admins.")
|
||||
chat.AddText(Color(255, 50, 50),"Look the console to see if the message is form an expression2")
|
||||
end
|
||||
|
||||
LocalPlayer():PrintMessage(HUD_PRINTCONSOLE, "[E2] " .. ply:Name() .. ": ")
|
||||
|
Loading…
Reference in New Issue
Block a user