PLUGIN - CS2-AutoBalancePlugin

Spatiul dedicat dezvoltatorilor. Aici gasesti resurse pentru CounterStrikeSharp, ajutor pentru cod si scripting avansat.
Post Reply
User avatar
greenie
Full Member
Full Member
Posts: 4444
Joined: Sun Nov 21, 2021 4:55 pm
Jucator SA:MP ?: Nu
Nick:: greenie
Jucator CS ?: Da

PLUGIN - CS2-AutoBalancePlugin

Post by greenie »

CS2-AutoBalancePlugin
Auto Balance Plugin for CS2 using CounterStrikeSharp

How to change the config file
1 - Run the server with the plugin, it will auto-generate a config.
2 - Open addons/counterstrikesharp/configs/plugins/AutoBalancePlugin/AutoBalancePlugin.json
3 - Change it however you want.

Available modes
Currently there is two balancing modes, they are:

Default mode: grabs the team with the most players and change them to the other team .
Scramble mode: every player is randomly put in some team, while still auto-balancing, good for retake servers and so on.
Changing modes
1 - Open the config file.
2 - Change the variable "ScrambleMode" to 0 for default mode or 1 for scramble mode.

Changing default message (colors and formatting)
1 - Open the config file.
2 - To change colors, change the variable "AutoBalanceMessage" as you like, here's the available color codes:

{DEFAULT}
{WHITE}
{DARKRED}
{GREEN}
{LIGHTYELLOW}
{LIGHTBLUE}
{OLIVE}
{LIME}
{RED}
{PURPLE}
{GREY}
{YELLOW}
{GOLD}
{SILVER}
{BLUE}
{DARKBLUE}
{BLUEGREY}
{MAGENTA}
{LIGHTRED}
OBS: {_playerName} and {_switchedTeam} are the variables for detecting the player name and team it was switched to, you can remove if you wan't.
Available Configurations
{
"ScrambleMode": false, // Setting that to true will make teams scramble upon auto-balance, good for retake servers
"KillPlayerOnSwitch": false, // Setting that to true will make player get killed when being switched
"BalanceOnRoundStart": false, // Setting that to true will make the auto-balance happen upon round start (default: on round end)
"BalanceBots": true, // Setting that to false will prevent bots from being accounted into the auto-balance
"MaximumAllowedDifference": 1 // Maximum players difference for the auto-balance to start working
"AutoBalanceMessage": " {GOLD}● [Auto Balance] {DEFAULT} -> {DEFAULT}Switched {GOLD}{_playerName} {DEFAULT}to {RED}{_switchedTeam}", // The message that will be displayed when a player is auto-balanced
"ConfigVersion": 1 // Config version, don't change
}
https://github.com/GabrielBigardi/CS2-A ... s/main.zip
π‘΄π’‚π’šπ’ƒπ’† 𝒕𝒉𝒆 𝑬𝒂𝒓𝒕𝒉 π’Šπ’” 𝒕𝒉𝒆 𝑯𝒆𝒍𝒍 𝒐𝒇 𝑨𝒏𝒐𝒕𝒉𝒆𝒓 𝑷𝒍𝒂𝒏𝒆𝒕... ☒️

βœ… GAZDUIRE JOCURI / VPS / GAZDUIRE WEB / SERVERE DEDICATE - Stock NELIMITAT / Valabil comandati pe https://www.zonek.ro/
Post Reply

Return to β€œScripting CS2”