0 Members and 1 Guest are viewing this topic.
L 08/03/2013 - 16:43:25: FAdmin Action: Tenshi (STEAM_0:1:68223774) Removed all decalsL 08/03/2013 - 16:43:25: "[LG] Taco Cliff<178><STEAM_0:1:37219778><>" disconnected (reason "Client 3 overflowed reliable channel.")L 08/03/2013 - 16:43:25: [LG] Taco Cliff (STEAM_0:1:37219778) DisconnectedL 08/03/2013 - 16:43:25: "Jeralynn<170><STEAM_0:1:44915738><>" disconnected (reason "Client 4 overflowed reliable channel.")L 08/03/2013 - 16:43:25: Jeralynn (STEAM_0:1:44915738) DisconnectedL 08/03/2013 - 16:43:25: "(KGC) Nyht Gunner<179><STEAM_0:0:28465605><>" disconnected (reason "Client 5 overflowed reliable channel.")L 08/03/2013 - 16:43:25: (KGC) Nyht Gunner (STEAM_0:0:28465605) DisconnectedL 08/03/2013 - 16:43:25: "Nyht Shadow<180><STEAM_0:0:42251730><>" disconnected (reason "Client 6 overflowed reliable channel.")L 08/03/2013 - 16:43:25: Nyht Shadow (STEAM_0:0:42251730) DisconnectedL 08/03/2013 - 16:43:25: "Elite_Matai<174><STEAM_0:0:59753662><>" disconnected (reason "Client 7 overflowed reliable channel.")L 08/03/2013 - 16:43:25: Elite_Matai (STEAM_0:0:59753662) Disconnected
-- CLIENT SIDE LUA --local sprays = {}local vOnce = truelocal vOnceB = truenet.Receive("vAddSpray", function() local ply = net.ReadEntity() if ply.SteamID then local normal = Vector(net.ReadFloat(), net.ReadFloat(), net.ReadFloat()) local ang = normal:Angle() local vec = ang:Forward() * .001 + (ang:Right() + ang:Up()) * 32 local pos = Vector(net.ReadFloat(), net.ReadFloat(), net.ReadFloat()) + ang:Up() * 4 sprays[ply:SteamID()] = {name = ply:Name(), pos1 = pos - vec, pos2 = pos + vec, normal = normal, clears = 0} endend)local function clear() for k, v in pairs(sprays) do v.clears = v.clears + 1 if v.clears >= 2 then sprays[k] = nil end endendnet.Receive("vClearDecals", clear)local old = RunConsoleCommandRunConsoleCommand = function(cmd, ...) if cmd == "r_cleardecals" then clear() end return old(cmd, ...)endlocal function isin(num, num1, num2) return (num >= num1 and num <= num2) or (num <= num1 and num >= num2)endsurface.CreateFont("vSpray", {font = "Trebuchet MS", size = 24, weight = 900})local first = truefunction isSpray( ply ) todraw = {} local trace = ply:GetEyeTrace() for k, v in pairs(sprays) do if v.normal == trace.HitNormal and isin(trace.HitPos.x, v.pos1.x, v.pos2.x) and isin(trace.HitPos.y, v.pos1.y, v.pos2.y) and isin(trace.HitPos.z, v.pos1.z, v.pos2.z) then table.insert(todraw, k) end end if #todraw > 0 then return true endendhook.Add("HUDPaint", "vPrintSprays", function() local todraw = {} local trace = LocalPlayer():GetEyeTrace() for k, v in pairs(sprays) do if v.normal == trace.HitNormal and isin(trace.HitPos.x, v.pos1.x, v.pos2.x) and isin(trace.HitPos.y, v.pos1.y, v.pos2.y) and isin(trace.HitPos.z, v.pos1.z, v.pos2.z) then table.insert(todraw, k) end end if #todraw > 0 then LocalPlayer().CanSpray = false if(vOnce) then if not(LocalPlayer().CanSpray) then net.Start("vSprayBlock") net.SendToServer() vOnceB = true vOnce = false end end if first then chat.AddText(Color(128, 128, 128), "You can view SteamID of spray owner by holding ALT while looking at it.") first = false end local y = ScrH() / 2 - #todraw * 12 draw.SimpleText("Sprayed by:", "vSpray", 10, y, Color(0, 63.75, 255), 0, 1) for k, v in pairs(todraw) do y = y + 24 draw.SimpleText(sprays[v].name .. (input.IsKeyDown(KEY_LALT) and (": " .. v) or ""), "vSpray", 10, y, Color(0, 63.75, 255), 0, 1) end else LocalPlayer().CanSpray = true if(LocalPlayer().CanSpray and vOnceB) then net.Start("vSprayAllow") net.SendToServer() vOnce = true vOnceB = false end endend)hook.Add("PlayerBindPress", "vNoSprayDelay", function( ply, cmd ) local canspray = false if( string.find(cmd, "impulse 201") ) then if not(ply:IsSuperAdmin()) then if not( LocalPlayer().CanSpray ) then net.Start("vSprayBlock") canspray = false chat.AddText(Color(255,0,0,255), "[SprayMon] ", Color(255,0,0,255), "You can not place a spray here!") return true else net.Start("vSprayAllow") net.SendToServer() canspray = true end else net.Start("vSprayAllow") net.SendToServer() canspray = true end if( canspray ) then net.Start("vSpray") net.SendToServer() else chat.AddText(Color(255,0,0,255), "[SprayMon] ", Color(255,0,0,255), "You can not place a spray here!") return true end endend)
-- SERVER SIDE LUA --util.AddNetworkString("vSprayBlock")util.AddNetworkString("vSprayAllow")util.AddNetworkString("vSpray")util.AddNetworkString("vAddSpray")util.AddNetworkString("vClearDecals")util.AddNetworkString("vSpray")CreateConVar("spraymon_nodelay", 1, {FCVAR_DEMO, FCVAR_GAMEDLL, FCVAR_SERVER_CAN_EXECUTE}, "no delay for 0:nobody | 1:admins | 2:superadmins")hook.Add("PlayerSpray", "vSendSpray", function(ply) local trace = ply:GetEyeTrace() net.Start("vAddSpray") net.WriteEntity(ply) net.WriteFloat(trace.HitNormal.x) net.WriteFloat(trace.HitNormal.y) net.WriteFloat(trace.HitNormal.z) net.WriteFloat(trace.HitPos.x) net.WriteFloat(trace.HitPos.y) net.WriteFloat(trace.HitPos.z) net.Broadcast()end)local plymeta = FindMetaTable("Player")local old = plymeta.ConCommandplymeta.ConCommand = function(self, cmd, ...) if string.find(cmd, "r_cleardecals") then old(self, cmd, ...) net.Start("vClearDecals") net.Send(self) end return old(self, cmd, ...)endnet.Receive("vSpray", function(_, ply) if GetConVarNumber("spraymon_nodelay") > 0 and (GetConVarNumber("spraymon_nodelay") > 1 and ply:IsSuperAdmin() or ply:IsAdmin()) then ply:AllowImmediateDecalPainting() endend)net.Receive("vSprayBlock", function(_, ply) ply:ChatPrint("Spraying Blocked") ply.SCanSpray = falseend)net.Receive("vSprayAllow", function(_, ply) ply:ChatPrint("Spraying Allowed") ply.SCanSpray = trueend)hook.Add("PlayerSpray", "vNoSprayBlock", function( ply ) if not( ply.SCanSpray == nil ) then if not( ply.SCanSpray ) then ply:SendLua([[chat.AddText(Color(255,0,0,255), "[SprayMon] ", Color(255,0,0,255), "You can not place a spray here!")]]) return true end endend)
It generally means you're sending too much data or creating too many cvars somehow... but that's really all the help I can offer, sorry.