Jailbreak

Intro
Jailbreak is a gamemode where inmates and guards battle one another. Inmates objective is to make it to the end of the round and get a last request. Guards are their to maintain order and following the orders given to them by the Warden.

Media

http://i.cubeupload.com/CUvhXV.jpg[/t]
[t]http://i.cubeupload.com/Jx3GET.jpg[/t]
[t]http://i.cubeupload.com/MpZLru.jpg[/t]
[t]http://i.cubeupload.com/xtpVJq.jpg[/t]
[t]http://i.cubeupload.com/Aucnf5.jpg[/t]
[t]http://i.imgur.com/KNkHKJQ.png[/t]
[t]http://i.imgur.com/XBiNWsW.png[/t]
[t]http://i.imgur.com/Uzm7wwP.png

Server Owners
The following convars can be used to change gameplay.



jb_round_limit   -  30  -  Max round limit before trying to change map.
jb_time_limit  -  900  -  Round time limit in seconds.
jb_ratio  -  3  -  Inmate to Guard ratio.


Additionally if you go into the sh_confi.lua file inside the gamemode folder. You can disable all or none hud elements, disable scoreboard, disable automatically changing to next map, allow lr tool access, and help text.
If you place to change any LR locations you must set/add your steam in the GM.ToolAccess table. And then give your self weapon_lr via your admin mod. Then you can change the locations.

Developers
Included currently there are 3 hooks provided (with more to come). All the below hooks are called on client and server. Client hooks are delayed by about 0.2 seconds. You are welcome to suggest and submit changes to the github. This can be code clean up, fixing bugs, adding features, etc.
[lua]
hook.Add(“RoundPrep”, “RoundPrepDummy”, function()
print(“RoundPrep”, CLIENT, SERVER)
end)

hook.Add(“RoundStart”, “RoundStartDummy”, function()
print(“RoundStart”, CLIENT, SERVER)
end)

hook.Add(“RoundEnd”, “RoundEndDummy”, function( win )
print(“RoundEnd”, CLIENT, SERVER, win)
if win == 1 then
– guards win
elseif win == 2 then
– inmates win
else
– timelimit
end
end)
[/lua]

The following functions are accessible on server and clients.
[lua]
Player:CanLR()
Player:SetLR( bool )
Player:CanBecomeWarden()
Player:SetWarden( bool )
Player:IsWarden()
Player:IsGuard()
Player:IsDeadGuard()
Player:IsInmate()
Player:IsDeadInmate()
Player:IsSpec()
Player:IsGuardBan()
Player:HasPrimary()
Player:HasSecondary()
Player:HasMelee()
Player:HasMisc()

Entity:IsPrimary()
Entity:IsSecondary()
Entity:IsMelee()
Entity:IsMisc()
[/lua]

Download
You can download it from workshop or my github. If you download it from the workshop you will either have to create lr locations for (race, kf, and shot for shot) or download them from github.
The following maps are supported(assuming you download them from github).



ba_jail_alcatraz_pre-final
ba_jail_blackops
ba_jail_canyondam_v6_fix
ba_jail_electric_aero_v1_1
ba_jail_hellsgamers_se_r2
ba_jail_ishimura_v2
ba_jail_minecraft_beach_beta3
jb_carceris_final_fixed
jb_castleguarddev
jb_italia_beta4
jb_lego_jail_v4
jb_new_summer_v2o
jb_no1_jail_v2b9
jb_parabellum_xg_v1-1
jb_paradise_prison_fix
jb_vipinthemix_v1_2


GitHub (comes map support)
Workshop (doesn’t come with map support)

Misc
This is an on going project . Expect bug fixes, new features, code clean up, optimizations to come as their submitted.
This version of this gamemode was created for [2017] GmodStore Garry’s Mod Gamemode Competition

Is there anything in particular that makes this different from any other Jailbreak gamemode?

It’s free, has last requests (built in framework), updates, offers customization, and bug fixes. I’m also accepting feature requests, community code commits, and planned on doing some localization.

I’ll gladly provide Spanish and Portuguese localisation if you need.

Currently working on localization. I will post a commit later today. If you’re still offering.

Added localization in dev branch. Master branch won’t be updated to match dev branch til after saturday. It will receive couple of bug fixes this is because GGC rules. GGC rules only allow bug fixes. So dev branch is a stable working copy. One thing to note I changed the LR tool. It used Derma Menu instead of a thousand binds. So all you need to do with that tool now is to right click and you can select the mode, angle, etc…

https://github.com/clrksml/jailbreak/tree/dev

For adding another language look at english.lua

https://github.com/clrksml/jailbreak/blob/dev/gamemode/languages/english.lua

I would recommend using a file environment approach to languages with

CompileFile and

debug.setfenv. It saves having to do any code work in the file. I did write a sort-of framework that I can send you if you wish.