Signed-off-by: Ayane Satomi <ayane@vignetteapp.org>
This commit is contained in:
Ayane Satomi 2022-11-18 07:11:49 +08:00
parent 572e69a433
commit ee8b448e93
No known key found for this signature in database
GPG key ID: 431E3C36BEBE204B
3 changed files with 51 additions and 2 deletions

2
.gitignore vendored
View file

@ -1,3 +1 @@
starfallex/kiosk.lua
lmao.lua
henke.lua

44
henke.lua Normal file
View file

@ -0,0 +1,44 @@
--@name Meowportation
--@author Henke
--@shared
if SERVER then
chip():setNoDraw(true)
local function getPlayerByName(str)
for k, v in pairs(find.allPlayers()) do
if string.match(string.lower(v:getName()), str) then return v end
end
end
local function gotoPlayer(pl)
pos = pl:getPos() + pl:getForward() * 64
if hasPermission("entities.canTool", owner()) then
owner():setPos(pos)
else
local seat = prop.createSeat(owner():getPos(), Angle(), "models/nova/jeep_seat.mdl", true)
seat:setNoDraw()
seat:use()
seat:setPos(pos)
seat:remove()
end
end
hook.add("PlayerSay", "gotoplayer", function(ply, text, teamChat)
if ply == owner() then
local cmd = string.sub(string.lower(text), 1, 5)
local str = string.sub(string.lower(text), 7) --lazy ok, u can basically do !sudo,name !sudo name !sudooname
if cmd == "!meow" then
local pl = getPlayerByName(str)
if isValid(pl) then
gotoPlayer(pl)
print("Teleported to " .. pl:getName())
end
return ""
end
end
end)
end

7
lmao.lua Normal file
View file

@ -0,0 +1,7 @@
hook.Add("PostDrawOpaqueRenderables", "henke", function()
for k, v in ipairs(player.GetAll()) do
local min, max = v:GetCollisionBounds()
render.DrawWireframeBox(v:GetPos(), Angle(), min, max, Color(255, 0, 0), true)
end
end)