Ulysses
Ulysses Stuff => General Chat & Help and Support => Topic started by: Shadow132 on January 31, 2015, 02:59:13 PM
-
I have been having problems with my server and respawning so if you can help this is what it looks like.
function ulx.respawn(calling_ply,target_plys)
local affected_plys = {}
for k,v in pairs(target_plys) do
if (not v:Alive()) and (v:Team() == 1 or v:Team() == 2) then
table.insert(affected_plys,v)
else
ULib.tsayError(calling_ply,v:Nick().." is spectator or alive!")
end
end
for k,v in pairs(affected_plys) do
v:Spawn()
end
ulx.fancyLogAdmin( calling_ply, "#A respawned #T", affected_plys)
end
local respawn = ulx.command("JailBreak", "ulx respawn", ulx.respawn, {"!respawn","!rs"},true)
respawn:addParam{ type=ULib.cmds.PlayersArg }
respawn:defaultAccess( ULib.ACCESS_SUPERADMIN )
respawn:help( "Respawn target<s>" )
-
Who's Jailbreak? Chessnut or Excl's?
Yes, it matters. They handle death differently.
-
It is Chessnuts Jailbreak that im currently using.
-
Chessnut's makes you change to a DEAD team when you die. So if you were killed as a prisoner, you swap to TEAM_DEADPRISONER or something. So make sure your teams are properly defined and you swap to the correct one and spawn.
Also search the forums for jailbreak because I think this topic has been discusses previously.