I'll throw my hat in here, as I've tweaked all 5 to work in JB7.
local CATEGORY_NAME = "Jailbreak"
local versioncheck = "";
local CurrentVersion = "1.2.5.JB7"
print("ULX Jailbreak by Classified Version("..CurrentVersion..") is loading")
local TEAM_GUARD = 2;
local TEAM_PRISONER = 1;
------------------------------ Make Prisoner------------------------------
function ulx.makeprisoner( calling_ply, target_plys )
local affected_plys = {}
for i=1, #target_plys do
local v = target_plys[ i ]
if ulx.getExclusive( v, calling_ply ) then
ULib.tsayError( calling_ply, ulx.getExclusive( v, calling_ply ), true )
//elseif not v:Alive() then
// ULib.tsayError( calling_ply, v:Nick() .. " is already dead!", true )
elseif v:IsFrozen() then
ULib.tsayError( calling_ply, v:Nick() .. " is frozen!", true )
else
v:KillSilent()
v:SetTeam(TEAM_PRISONER)
v.AllowRespawn = true
v:Spawn();
table.insert( affected_plys, v )
end
end
ulx.fancyLogAdmin( calling_ply, "#A changed the team of #T", affected_plys )
end
local makeprisoner = ulx.command( CATEGORY_NAME, "ulx makeprisoner", ulx.makeprisoner, "!makeprisoner" )
makeprisoner:addParam{ type=ULib.cmds.PlayersArg }
makeprisoner:defaultAccess( ULib.ACCESS_ADMIN )
makeprisoner:help( "Changes the team of the target(s) to prisoner." )
------------------------------ Make Guard ------------------------------
function ulx.makeguard( calling_ply, target_plys )
local affected_plys = {}
for i=1, #target_plys do
local v = target_plys[ i ]
if ulx.getExclusive( v, calling_ply ) then
ULib.tsayError( calling_ply, ulx.getExclusive( v, calling_ply ), true )
//elseif not v:Alive() then
// ULib.tsayError( calling_ply, v:Nick() .. " is already dead!", true )
elseif v:IsFrozen() then
ULib.tsayError( calling_ply, v:Nick() .. " is frozen!", true )
else
v:KillSilent()
v:SetTeam(TEAM_GUARD)
v.AllowRespawn = true
v:Spawn();
table.insert( affected_plys, v )
end
end
ulx.fancyLogAdmin( calling_ply, "#A changed the team of #T", affected_plys )
end
local makeguard = ulx.command( CATEGORY_NAME, "ulx makeguard", ulx.makeguard, "!makeguard" )
makeguard:addParam{ type=ULib.cmds.PlayersArg }
makeguard:defaultAccess( ULib.ACCESS_ADMIN )
makeguard:help( "Changes the team of the target(s) to prisoner." )
------------------------------ Make Warden ------------------------------
function ulx.makewarden( calling_ply, target_plys )
local affected_plys = {}
for i=1, #target_plys do
local v = target_plys[ i ]
if ulx.getExclusive( v, calling_ply ) then
ULib.tsayError( calling_ply, ulx.getExclusive( v, calling_ply ), true )
elseif not v:Alive() then
ULib.tsayError( calling_ply, v:Nick() .. " is already dead!", true )
elseif v:IsFrozen() then
ULib.tsayError( calling_ply, v:Nick() .. " is frozen!", true )
else
local warden=JB.TRANSMITTER:GetJBWarden()
if IsValid(warden) then
warden:RemoveWardenStatus();
table.insert( affected_plys, warden )
end
v:KillSilent()
v:SetTeam(TEAM_GUARD)
v.AllowRespawn = true
v:Spawn();
v:AddWardenStatus();
table.insert( affected_plys, v )
end
end
ulx.fancyLogAdmin( calling_ply, "#A forced warden #T", affected_plys )
end
local makewarden = ulx.command( CATEGORY_NAME, "ulx makewarden", ulx.makewarden, "!makewarden" )
makewarden:addParam{ type=ULib.cmds.PlayersArg }
makewarden:defaultAccess( ULib.ACCESS_ADMIN )
makewarden:help( "Force warden of the target(s)." )
------------------------------ Demote Warden ------------------------------
function ulx.demotewarden( calling_ply, target_plys )
local affected_plys = {}
local warden=JB.TRANSMITTER:GetJBWarden()
if IsValid(warden) then
table.insert( affected_plys, warden )
warden:RemoveWardenStatus();
end
ulx.fancyLogAdmin( calling_ply, "#A demoted warden #T", affected_plys )
end
local demotewarden = ulx.command( CATEGORY_NAME, "ulx demotewarden", ulx.demotewarden, "!demotewarden" )
demotewarden:addParam{ type=ULib.cmds.PlayersArg }
demotewarden:defaultAccess( ULib.ACCESS_ADMIN )
demotewarden:help( "Demote current warden to guard." )
------------------------------ ROUND END ------------------------------
function ulx.roundend( calling_ply )
local number = 5
timer.Create( "RoundEndTimer", 1, 5, function()
number = number - 1
if number == 0 then
number = "NOW!"
end
ULib.csay( _, "ROUND ENDS ".. tostring(number) )
print(tostring(number))
end)
JB:EndRound()
ulx.fancyLogAdmin( calling_ply, "#A ended the round.", affected_plys )
end
local roundend = ulx.command( CATEGORY_NAME, "ulx roundend", ulx.roundend, "!roundend" )
roundend:defaultAccess( ULib.ACCESS_ADMIN )
roundend:help( "Restart the round/End the current round." )