From 81fb8c7148b29ea43b8715a2d36cfa58aa45369a Mon Sep 17 00:00:00 2001 From: coolname_5262623 <124378025+happy1063@users.noreply.github.com> Date: Sun, 15 Dec 2024 11:27:26 +0300 Subject: [PATCH] Update ai.txt --- ai_ru/ai.txt | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/ai_ru/ai.txt b/ai_ru/ai.txt index 8b13789..0beac68 100644 --- a/ai_ru/ai.txt +++ b/ai_ru/ai.txt @@ -1 +1,51 @@ - + --@name ai +--@author ! +--@shared +--@owneronly +if SERVER then + net.receive("text",function() + owner():say(net.readString()) + end) +end +if CLIENT then +local text = "" +local time = file.time("ai/an.txt") +local model = "none" +local enter = http.urlDecode("%0A") +local mesage = "" +local handobj = "" +file.write("ai/qu.txt","") +file.write("ai/an.txt","") +hook.add("PlayerChat","",function(ply,str) + if ply == player() and string.find(str,"Ai") then + print(str) + return true + end + if string.explode("",str)[1] == "/" then + mesage = str + if ply:getEyeTrace().Entity and ply:getEyeTrace().Entity:isValid() then + model = "Model: "..ply:getEyeTrace().Entity:getModel().." Class: "..ply:getEyeTrace().Entity:getClass().." Color(Red Green Blue Alpha): "..tostring(ply:getEyeTrace().Entity:getColor()) + else + model = "none" +end +if ply:getActiveWeapon() and ply:getActiveWeapon():isValid() then +handobj = ply:getActiveWeapon():getModel() +else + handobj = "none" +end + file.write("ai/qu.txt",http.urlDecode("%D0%98%D0%B3%D1%80%D0%BE%D0%BA%20%D1%81%20%D0%BD%D0%B8%D0%BA%D0%BE%D0%BC%20")..ply:getName().." "..http.urlDecode("%28%D0%A0%D0%BE%D0%BB%D1%8C%20%3A%20")..ply:getUserGroup().." , "..http.urlDecode("%20%D1%81%D0%B5%D1%80%D0%B2%D0%B5%D1%80%20%3A%20").." Classicbox".." , "..http.urlDecode("%D0%A1%D0%BC%D0%BE%D1%82%D1%80%D0%B8%D1%82%20%D0%BD%D0%B0%20%3A%20")..model.." , "..http.urlDecode("%D0%94%D0%B5%D1%80%D0%B6%D0%B8%D1%82%20%D0%B2%20%D1%80%D1%83%D0%BA%D0%B0%D1%85%20%3A%20")..handobj.." )".." : "..string.sub(mesage,2)) +end +end) +hook.add("think","",function() +if file.time("ai/an.txt") != time then +text = file.read("ai/an.txt") +if text == nil then + text = "" +end +net.start("text") +net.writeString("Ai : "..string.sub(text,5)) +net.send() +end +time = file.time("ai/an.txt") +end) +end