mirror of
https://github.com/sr229/metastruct-experiments.git
synced 2024-09-20 06:30:36 +00:00
meow
Signed-off-by: Ayane Satomi <ayane@vignetteapp.org>
This commit is contained in:
parent
572e69a433
commit
ee8b448e93
3 changed files with 51 additions and 2 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,3 +1 @@
|
||||||
starfallex/kiosk.lua
|
starfallex/kiosk.lua
|
||||||
lmao.lua
|
|
||||||
henke.lua
|
|
||||||
|
|
44
henke.lua
Normal file
44
henke.lua
Normal 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
7
lmao.lua
Normal 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)
|
Loading…
Reference in a new issue