Thread: Team Ban
View Single Post
Author Message
Azelphur
AlliedModders Donor
Join Date: Jun 2010
Old 02-07-2011 , 18:41   Team Ban
Reply With Quote #1

This is a simple plugin to allow you to ban a player from teams, This is handy for dealing with trolls who abuse team mechanics, such as shooting all the T's on jailbreak, or not planting the bomb on CT

It uses client preferences for storage (so MySQL/sqlite), It should work on any mod (in theory), reply here if it doesn't work on your mod.

Commands:
sm_teamban <name|#userid> <team> - Bans a player from <team>. Example: sm_teamban Azelphur ct
sm_teamunban <name|#userid> <team> - Unbans a player from <team>. Example: sm_teamunban Azelphur ct

Cvars:
sm_teamban_disable - Use this to disable the ability to ban people from certain teams, It's a bitmask. Each team has a number, for example on CS:S 1 is spectator, 2 is counter terrorist, 4 is terrorist, add the numbers together to disable. for example to disable banning from CT and T, 2+4 = 6, so sm_teamban_disable 6. or to disable spectator and terrorist, 1+4 = 5.

I wrote this as a paid job for XenoGamers and they have kindly asked me to post the plugin and share it with everyone


* Changelog *
0.3:
Fixed missing translations
Small optimization, switched to AddCommandListener()
0.2:
Fixed error messages in sm_teamban and sm_teamunban
Attached Files
File Type: sp Get Plugin or Get Source (teamban.sp - 4065 views - 12.2 KB)
__________________

Last edited by Azelphur; 02-10-2011 at 20:54.
Azelphur is offline