Right, so I need help with my Jailbreak commands for respawning players in case they were RDMed.
I use Excl's Jailbreak 7.
function ulx.spawn( calling_ply, target_plys )
local affected_plys = {}
for k,v in pairs(target_plys) do
if !v:Alive() then
v:Spawn()
table.insert(affected_plys, v)
end
end
ulx.fancyLogAdmin( calling_ply, "#A respawned #T", affected_plys )
end
local spawn = ulx.command( "Utility", "ulx respawn", ulx.spawn, "!respawn" )
spawn:addParam{ type=ULib.cmds.PlayersArg }
spawn:defaultAccess( ULib.ACCESS_SUPERADMIN )
spawn:help( "Respawned target(s)." )
Any help? This code works, but when it respawns a player, it doesn't respawn them physically. It sends them to a different living player in spectator mode. Any idea on how to fix this?
Code was not written by me.