Ulysses

Ulysses Stuff => General Chat & Help and Support => Topic started by: Shadow132 on January 31, 2015, 02:59:13 PM

Title: Respawn for Jailbreak Server
Post 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.
Code: [Select]
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>" )
Title: Re: Respawn for Jailbreak Server
Post by: Caustic Soda-Senpai on January 31, 2015, 05:05:42 PM
Who's Jailbreak? Chessnut or Excl's?

Yes, it matters. They handle death differently.
Title: Re: Respawn for Jailbreak Server
Post by: Shadow132 on February 01, 2015, 10:43:29 AM
It is Chessnuts Jailbreak that im currently using.
Title: Re: Respawn for Jailbreak Server
Post by: Caustic Soda-Senpai on February 01, 2015, 06:29:19 PM
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.