Skip to content

Instantly share code, notes, and snippets.

View CapsAdmin's full-sized avatar
🌜
Lua

Elias Hogstvedt CapsAdmin

🌜
Lua
View GitHub Profile
local data = {}
local temp_ang = Angle(0,0,0)
local function rot(vec, yaw)
temp_ang.y = yaw
temp_ang.p = math.Rand(-10, 10) * 5
vec:Rotate(temp_ang)
return vec
end
768 slob
543 zyloseverett
417 braxus
357 zetanor
310 atomic
298 shen
259 chrisaster
257 salte
257 samzanemesis
239 gdaaigfiredragonfs
function EFFECT:Init()
self.Time = 1
end
function EFFECT:Think()
self.Time = self.Time - (FrameTime() * 0.5) -- lower for slower speed
if self.Time < 0 then
return false
end
local server = luasocket.TCPServer()
server:Bind("localhost", 1000)
local client = luasocket.TCPClient()
client:Connect("localhost", 1000)
client:Send("hello\n")
client:Send("hello\n")
client:Send("hello\n")
client:Send("hello\n")
local SHADER = {
shared = {
uniform = {
time = 0,
},
},
vertex = {
uniform = {
camera_matrix = "mat4",
gmod = gmod or {}
gmod.Ip = "88.191.111.120"
gmod.ServerPort = 27005
gmod.ClientPort = 5556
gmod.Hooks = gmod.Hooks or {}
function gmod.Hook(tag, callback)
gmod.Hooks[tag] = callback
html_material_panels = html_material_panels or {}
function ClearCustomMaterials()
for key, pnl in pairs(html_material_panels) do
if pnl:IsValid() then
pnl:Remove()
end
end
html_material_panels = {}
do -- _G
function loadstring(str)
local var = CompileString(str, "loadstring", false)
if type(var) == "string" then
return nil, var, 2
end
return var
end
function loadfile(str)
--hook.Add("Think",1,function() ??
for k,v in pairs(player.GetAll()) do
local ent = v:GetEyeTrace().Entity
if v:KeyDown(IN_USE and ent:IsVehicle() then
if v.mycar ~= ent then
pirnt("hm")
v.mycar = ent
v.mycartime = CurTime()
elseif v.mycar == ent and v.mycartime + 2 >= CurTime() then
v.mycar:GetDriver():ExitVehicle()
function Log(fmt, ...)
str = os.date("[%H:%M:%S] ") .. fmt:format(...) .. "\n"
file.Append(os.date("log/%m-%d-%y.txt"), str)
end
hook.Add("Initialize", "log", function()
Log("New map: %s", game.GetMap())
end)