I'll provide the entire code for novelty I suppose. Though I will read through the rest of the file in the morning when I am more attentive.
function ulx.breeze(calling_ply, target_ply)
if not calling_ply:IsValid() then
MsgN("You cannot use this from the console.")
return
end
if not target_ply:Alive() then
ULib.tsayError(calling_ply, target_ply:Nick() .. " is dead!", true)
return
end
if not calling_ply:Alive() then
ULib.tsayError(calling_ply, "You are dead!", true)
return
end
if calling_ply == target_ply then
ULib.tsayError(calling_ply, "You are trying to get closer to yourself than we feel is necessary.", true)
return
end
if target_ply:InVehicle() then
target_ply:ExitVehicle()
end
target_ply:SetPos(calling_ply:GetPos() + Vector(50, 50, 0))
target_ply:Freeze(true)
ulx.fancyLogAdmin(calling_ply, "#A has summoned and frozen #T", target_ply)
end
local breeze = ulx.command(CATEGORY_NAME, "ulx breeze", ulx.breeze, "!breeze", true)
breeze:addParam{type=ULib.cmds.PlayerArg}
breeze:defaultAccess(ULib.ACCESS_ADMIN)
breeze:help("Summons and freezes a player.")
God <censor> I'm an idiot.
All it took was literally this...
target_ply.ulx_prevpos = target_ply:GetPos()
target_ply.ulx_prevang = target_ply:EyeAngles()
Note to self, don't try to work when you can barely think. Things won't work out.
Thanks though, JamminR, I probably would've starred at this in awe for a couple more hours if you haven't pointed out that it never defined a previous position for the target player.