Skip to content
thomas edited this page May 23, 2018 · 11 revisions

Manage team ratios and a queue system for prisoners to join guard through. Allow admins to remove player from queue. Supports priority queue to allow players with a certain flag to skip all players in the queue without that flag.
If wanted the player has to accept a agreement or answer a some questions before join the queue.
Force Player to join T on connect. Bypass for admins/VIPs.
Can be used with CTBans to block joining queue/guard when CTBanned.

Commands

sm_guard - Allows the prisoners to queue to CT
sm_viewqueue - Allows a player to show queue to CT.
sm_leavequeue - Allows a player to leave queue to CT.
sm_ratio - Allows the admin toggle the ratio check and player to see if ratio is enabled
sm_prisoner - Allows a player to join prisoner
sm_spectator - Allows a player to join spectator

set your own custom command. take a look at "sm_ratio_cmds_FEATURENAME"

AdminCommands // ADMFLAG_GENERIC

sm_removequeue- Allows the admin to remove player from queue to CT.

ConVars

// Set your chat prefix for this plugin.
// -
// Default: "[{green}MyJB.Ratio{default}]"
sm_ratio_prefix "[{green}MyJB.Ratio{default}]"

// Set your custom chat command for become guard(!guard (no 'sm_'/'!')(seperate with comma ', ')(max. 12 commands))
// -
// Default: "g, ct, guards"
sm_ratio_cmds_guard "g, ct, guards"

// Set your custom chat command for view guard queue (!viewqueue (no 'sm_'/'!')(seperate with comma ', ')(max. 12 commands))
// -
// Default: "vq, queue"
sm_ratio_cmds_queue "vq, queue"

// Set your custom chat command for view leave queue (!leavequeue (no 'sm_'/'!')(seperate with comma ', ')(max. 12 commands))
// -
// Default: "lq, stay"
sm_ratio_cmds_leave "lq, stay"

// Set your custom chat command for view/toggle ratio (!ratio (no 'sm_'/'!')(seperate with comma ', ')(max. 12 commands))
// -
// Default: "balance"
sm_ratio_cmds_ratio "balance"

// Set your custom chat command for admins to remove a player from guard queue (!removequeue (no 'sm_'/'!')(seperate with comma ', ')(max. 12 commands))
// -
// Default: "rq"
sm_ratio_cmds_remove "rq"

// Set your custom chat command for admins to clear the guard queue (!clearqueue (no 'sm_'/'!')(seperate with comma ', ')(max. 12 commands))
// -
// Default: "cq"
sm_ratio_cmds_clear "cq"

// Set your custom chat command for player to move to prisoner (!prisoner (no 'sm_'/'!')(seperate with comma ', ')(max. 12 commands))
// -
// Default: "t,terror"
sm_ratio_cmds_prisoner "t,terror"

// Set your custom chat command for player to move to spectator (!spectator (no 'sm_'/'!')(seperate with comma ', ')(max. 12 commands))
// -
// Default: "spec"
sm_ratio_cmds_spec "spec"

// Set your custom chat command for player to move to spectator (!noguard (no 'sm_'/'!')(seperate with comma ', ')(max. 12 commands))
// -
// Default: "noct"
sm_ratio_cmds_noct "noct"

// How many prisoners for each guard.
// -
// Default: "2"
// Minimum: "1.000000"
sm_ratio_T_per_CT "2"

// 0 - disabled, 1 - enable VIPs moved to front of queue
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_ratio_flag "1"

// 0 - disabled, 1 - force player on connect to join T side
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_ratio_force_t "1"

// Set the flag for VIP
// -
// Default: "a"
sm_ratio_vipflag "a"

// Allow the admin to toggle 'ratio check & autoswap' on/off with !ratio
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_ratio_disable "0"

// Announce in a chatmessage on roundend when ratio is disabled
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_ratio_disable_announce "0"

// 0 - disabled, 1 - enable adverstiment for 'VIPs moved to front of queue' when player types !guard 
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_ratio_adsvip "1"

// 0 - instandly join ct/queue, no confirmation / 1 - confirm rules / 2 - Qualification questions
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "2.000000"
sm_ratio_join_mode "1"

// How many question a player have to answer before join ct/queue. need sm_ratio_join_mode 2
// -
// Default: "3"
// Minimum: "1.000000"
// Maximum: "5.000000"
sm_ratio_questions "3"

// Bypass Admin/VIP though agreement / question
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_ratio_vip_bypass "1"

// 0 = Could result in unbalanced teams. 1 = Switch a random T, when nobody is in guardqueue to balance the teams.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_ratio_balance_terror "1"

// Mode to choose a guard to be switch to T on balance the teams. 1 = Last In First Out / 0 = Random Guard
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_ratio_balance_guard "1"

// Prevent warden & deputy to be switch to T on balance the teams. Could result in unbalanced teams
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_ratio_balance_warden "1"

// 0 - Move player on next round to CT / 1 - Move player immediately to CT and respawn
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_ratio_respawn "1"

// 0 - Don't do anything if a Spec join in queue / 1 - Swap to T the Spectators who join in queue
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_ratio_swap_spec_queue "1"

// 1 - disabled guard queue, 0 - enable guard queue
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_ratio_disable_queue "0"

Files

/addons/sourcemod/plugins/MyJailbreak/ratio.smx
/addons/sourcemod/scripting/MyJailbreak/ratio.sp
/addons/sourcemod/configs/MyJailbreak/questions.cfg /addons/sourcemod/translation/MyJailbreak.Ratio.phrases.txt