ULX

Author Topic: Respawn for Jailbreak Server  (Read 1720 times)

0 Members and 1 Guest are viewing this topic.

Offline Shadow132

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Respawn for Jailbreak Server
« 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>" )
« Last Edit: February 01, 2015, 10:46:17 AM by Shadow132 »

Offline Caustic Soda-Senpai

  • Sr. Member
  • ****
  • Posts: 469
  • Karma: 54
  • <Insert something clever here>
    • Steam Page
Re: Respawn for Jailbreak Server
« Reply #1 on: January 31, 2015, 05:05:42 PM »
Who's Jailbreak? Chessnut or Excl's?

Yes, it matters. They handle death differently.
Once you get to know me, you'll find you'll have never met me at all.

Offline Shadow132

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: Respawn for Jailbreak Server
« Reply #2 on: February 01, 2015, 10:43:29 AM »
It is Chessnuts Jailbreak that im currently using.

Offline Caustic Soda-Senpai

  • Sr. Member
  • ****
  • Posts: 469
  • Karma: 54
  • <Insert something clever here>
    • Steam Page
Re: Respawn for Jailbreak Server
« Reply #3 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.
Once you get to know me, you'll find you'll have never met me at all.