Description:
Simple plugin the switch all players to the opposite team when half of the map time has passed and the round ended.
Background:
Some maps people find to be unbalanced. This plugin tries to make it equal for everyone. All get to play both sides of the map.
Change log:
1.0 - First Version
1.0.1 - Using bool values (Thanks pRED)
1.0.2 - Added reset of halftime flag to false in OnMapStart just for safety
1.0.3 - Cleaned up code. Added logging to logfile due to some reported problems. Works fine in the last tests.
1.0.4 - Adding sounds
1.0.5 - Switching the score when teams switch
1.0.6 - Now switch of scores stays
1.0.7 - Added variable to reset money and weapons at switch
Added possibility to disable the halftime sound
Added global forward "gemHalftime" if other scripts want to do something in halftime
1.0.8 - Added possibility to switch teams based on rounds as well. Either maxrounds or winlimit.
1.0.9 - Removed unnecessary logmessages, less spam in logs.
1.0.10 - Fixed bug where nopt all grenades and def kit were removed
1.1.11 - Fix so it works with new CSS update
Note:
1.0.5 switch did not work due to what I think is a bug in sourcemod. Reported the bug,
https://bugs.alliedmods.net/show_bug.cgi?id=3722. We'll see what happens.
In the mean time, version 1.0.6 takes care of displaying the correct scores. Thanks to [MKBI]Relle for pointing out the simple work around
Install instructions:
Put the plugin in the standard plugin dir
Unzip gem_sounds under cstrike/sound
Alter your pure_server_whitelist.txt (if you are running pure server) and add
Code:
sound\gem_sounds\*.* allow_from_disk
Variables:
sm_halftime_sound - The sound that should be played in halftime, gem_sounds/teamswitch.mp3 is default. If set to "" in the config, halftime sound is disabled and no download occurs.
sm_halftime_money_reset - Can be 0 or 1. 0 means no reset of money or weapons. You keep what you have. 1 means, all wepons and armour are removed, starting with standard pistol and mp_startmoney to by for.
sm_halftime_teamswitch_type - It can have the following values ...
timelimit - switch will be done at the end of the round when more than half of
mp_timelimit has passed.
maxrounds - switch will be done at then end of the round when playedRounds >= mp_maxrounds
winlimit- switch will be done at then end of the round when playedRounds >= mp_winlimit