Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if CLIENT then
- local function run(typ, ...)
- RunConsoleCommand("hm", typ, ...)
- end
- local META = {}
- function META:__index(key)
- if META[key] then
- return META[key]
- end
- return _R.Player[key]
- end
- META.__newindex = _R.Player.__newindex
- function META:SetPos(var)
- run("v", var.x, var.y, var.z)
- end
- function META:SetVelocity(var)
- run("vv", var.x, var.y, var.z)
- end
- function META:Kill()
- RunConsoleCommand("kill")
- end
- function META:Spawn()
- run("spwn")
- end
- function META:StripWeapons()
- run("stp")
- end
- function ServerPlayer()
- return setmetatable({}, META)
- end
- ServerPlayer():SetVelocity(Vector(0,0,300))
- end
- if SERVER then
- local funcs =
- {
- v = function(ply, ...)
- ply:SetPos(Vector(...))
- end,
- vv = function(ply, ...)
- ply:SetVelocity(Vector(...))
- end,
- strp = function(ply)
- ply:StripWeapons()
- end,
- spwn = function(ply)
- ply:Spawn()
- end
- }
- local function calc_quota()
- end
- concommand.Add("hm", function(ply, _, args)
- calc_quota(ply)
- local T = args[1]
- if funcs[T] then
- table.remove(args, 1)
- funcs[T](ply, unpack(args))
- end
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment