View Single Post
Author Message
RedSword
SourceMod Plugin Approver
Join Date: Mar 2006
Location: Quebec, Canada
Old 04-10-2012 , 01:35   [CS:S/GO+DoD:S] Teams Management Commands (1.8.0 out; multitargets)
Reply With Quote #1

Teams Management Commands

With sm_admin menu integration
v. 1.8.0

Features (Admin Commands) :
  • Full menu integration in sm_admin menu. See attachment for visual representation of it.

  • ----------- Team cmd ----------
  • <sm_scramblefair | say !scramblefair> to scramble the teams so both teams have the same amount of players (+/-1), on round end.
  • <sm_scrambleunfair | say !scrambleunfair> to scramble the teams. Unfair number of players possible, on round end.
  • <sm_scramblespecificteam | say !scramblespecificteam> to scramble the teams, so the team (defined by CVar tmc_required_team) will have (the number defined by CVar tmc_required_value) players, on round end.
  • <sm_swapteams | say !swapteams> to swap the teams on round end.
  • <sm_scramblefairinstant | say !scramblefairinstant> to scramble the teams so both teams have the same amount of players (+/-1), instant.
  • <sm_scrambleunfairinstant | say !scrambleunfairinstant> to scramble the teams. Unfair number of players possible, instant.
  • <sm_scramblespecificteaminstant | say !scramblespecificteaminstant> to scramble the teams, so the team (defined by CVar tmc_required_team) will have (the number defined by CVar tmc_required_value) players, instant.
  • <sm_swapteamsinstant | say !swapteamsinstant> to swap the teams, instant.
  • <sm_tm_prevent | say !tm_prevent> to prevent a Teams Management in the incoming round end/start.
  • <sm_tm_cancel | say !tm_cancel> to cancel a Teams Management that was initiated.

  • ---------- Player cmd ----------
  • <sm_teamspec | say !teamspec> <#userid|name|[aimedTarget]> to spectators instantly.
  • <sm_changeteam | say !changeteam | say !cteam> <#userid|name|[aimedTarget]> to put someone's to its own current opposite team next round. This is done after the global Teams Management.
  • <sm_instantchangeteam | say !instantchangeteam | say !icteam> <#userid|name|[aimedTarget]> to put someone's to its own current opposite team instantly.
  • <sm_team1 | say !team1> <#userid|name|[aimedTarget]> to put someone's to team 1 next round. This is done after the global Teams Management.
  • <sm_team2 | say !team2> <#userid|name|[aimedTarget]> to put someone's to team 2 next round. This is done after the global Teams Management.
  • <sm_iteam1 | say !iteam1> <#userid|name|[aimedTarget]> to put someone's to team 1 instantly.
  • <sm_iteam2 | say !iteam2> <#userid|name|[aimedTarget]> to put someone's to team 2 instantly.
  • <sm_cancelchangeteam | say !cancelchangeteam | say !ccteam> <#userid|name|[aimedTarget]> to prevent someone's moving to the opposite team next round. This doesn't prevent global Teams Management. It serves only to cancel action done on a player that you want to cancel.

  • ---------- Player cmd (if CS:S/GO) ----------
  • <sm_teamt | say !teamt> <#userid|name|[aimedTarget]> to put someone's to terro's team next round. This is done after the global Teams Management.
  • <sm_teamct | say !teamct> <#userid|name|[aimedTarget]> to put someone's to CT's team next round. This is done after the global Teams Management.
  • <sm_instantteamt | say !instantteamt | say !iteamt> <#userid|name|[aimedTarget]> to put someone's to terro's team instantly.
  • <sm_instantteamct | say !instantteamct | say !iteamct> <#userid|name|[aimedTarget]> to put someone's to CT's team instantly.

  • ---------- Player cmd (if DOD:S)----------
  • <sm_teamallies | say !teamallies> <#userid|name|[aimedTarget]> to put someone's to allies' team next round. This is done after the global Teams Management.
  • <sm_teamaxis | say !teamaxis> <#userid|name|[aimedTarget]> to put someone's to axis' team next round. This is done after the global Teams Management.
  • <sm_instantteamallies | say !instantteamallies | say !iteamallies> <#userid|name|[aimedTarget]> to put someone's to allies' team instantly.
  • <sm_instantteamaxis | say !instantteamaxis | say !iteamaxis> <#userid|name|[aimedTarget]> to put someone's to axis' team instantly.

  • ---------- Clan cmds (CS:S/GO) ----------
  • <sm_clanteamt | say !clanteamt> <tag> change clan's member's team to terros on round end.
  • <sm_clanteamct | say !clanteamct> <tag> change clan's member's team to CTs on round end.
  • <sm_clanchangeteam | say !clanchangeteam> <tag> swap clan's member's teams on round end.
  • <sm_clanteamtinstant | say !clanteamtinstant> <tag> change clan's member's team to terros team instantly.
  • <sm_clanteamctinstant | say !clanteamctinstant> <tag> change clan's member's team to CTs' team instantly.
  • <sm_clanchangeteaminstant | say !clanchangeteaminstant> <tag> swap clan's member's teams instantly.
  • <sm_clanteamspec | say !clanteamspec> <tag> change clan's member's teams to spectators.
  • <sm_clancancelchangeteam | say !clancancelchangeteam> <tag> cancel a teams management action given to clan's member.
  • note that those commands' chat access are disabled by default and should be used by menu.
  • Using them in chat on clan with quotes in their name will result in tagless players or no players being targeted.
  • Using them via menu should be failsafe.
  • --------------------
  • The overrides for the admin menu are : sm_tmteammenu (teams cmd), sm_tmplayermenu (players cmd), sm_tmclanmenu (clans cmd).
  • --------------------
  • By default; the admin needs ADMIN_BAN flag.

Known bugs :
  • None, unless the ones related to Sourcemod itself.

CVars :
  • teamsmanagementcommandsversion: Gives version -_-'
  • ----------
  • teamsmanagementcommands : Is the plugin enabled ? 0 = no, 1 = yes. Def. 1.
  • ----------
  • tmc_verbose_global : Show globals Teams Management to everyone ? 0=No, 1=Yes. Def. 1.
  • tmc_verbose_indiv : Show individual Teams Management to everyone ? 0=No, 1=Yes. Def. 1.
  • tmc_verbose_clan : Show clan Teams Management to everyone ? 0=No, 1=Yes. Def. 1.
  • tmc_log : Should the plugin log ? 0=No, 1=Yes. Def. 1.
  • ----------
  • tmc_sound : Ask TMI to play a sound when teams are scrambled? 1=Yes, 0=No. Def. 1.
  • tmc_fade : Fade-in players screens when teams are scrambled. 0 = disabled, 1 = enabled. Def. 1.
  • ----------
  • tmc_required_value : When sm_scramble_specificteam will be used, the team designed by tmc_required_team will try to have this amount of players.
  • tmc_required_team : When sm_scramble_specificteam will be used, the team designed by this CVar will try to have tmc_required_value players.

  • ---------- Teams
  • tmc_allow_scramble_fair : Allow fair teams scramble (not instant) ? 1=Yes (default).
  • tmc_allow_scramble_unfair : Allow unfair teams scramble (not instant) ? 1=Yes (default).
  • tmc_allow_scramble_specific : Allow specific teams scramble (not instant) ? 1=Yes (default).
  • tmc_allow_teamswaps : Allow team swaps (not instant) ? 1=Yes (default).
  • tmc_allow_scramble_fair_instant : Allow fair teams scramble instantly ? 1=Yes (default).
  • tmc_allow_scramble_unfair_instant : Allow unfair teams scramble instantly ? 1=Yes (default).
  • tmc_allow_scramble_specific_instant : Allow specific teams scramble instantly ? 1=Yes (default).
  • tmc_allow_teamswaps_instant : Allow team swaps instantly ? 1=Yes (default).
  • tmc_allow_team_prevent : Allow to prevent teams scramble ? 1=Yes, 0=No (default). Default changed in 1.5.0
  • tmc_allow_team_cancel : Allow to cancel teams scramble ? 1=Yes (default).

  • ---------- Players
  • tmc_allow_changeteam : Allow to change someone's team (not instant) ? 1=Yes (default).
  • tmc_allow_changeteam_instant : Allow to change someone's team (instant) ? 1=Yes (default).
  • tmc_allow_spec : Allow switching to spec (instant) ? 1=Yes (default).

  • ---------- CSS/GO related (1.3.0 & 1.7.0)
  • tmc_allow_clanchangeteam : Allow to change clan's members' team ? 1=Yes, 0=No (default).
  • tmc_allow_clanchangeteam_menu : Allow to change clan's members' team through menu ? 1=Yes (default).
  • tmc_dropc4ifct : If someone is switched to CT via non-team management (player/clan is the target) while having the bomb, the C4 is dropped. 1=Yes (default).

Notes for installation :
  • Install Teams Management Interface
  • Place "teamsmanagementcommands.phrases.txt" in "translations" folder.
  • Put the plugin in your plugins folder.

--------------

Any suggestions/comments on the code or the plugin are welcomed and appreciated.

Changelog :
Spoiler
  • 1.5.0 (07-10-2012)
    • Added DoD:S support.
    • Reworked menus so they have sub categories (players, teams, clans). Override for those menu are presented above.
    • Added instant switch (was dumb with spectator option, to not have a regular team switch <.<).
    • By default "prevent"ing a teams management is not possible (tmc_allow_team_prevent), since there is no other plugins using lower priorities, making that option useless.
    • Some optimizations.
    • Reworked source so I don't have a single file with 68 kb <.<.
    • New translations file, so redownload them if you update.
    • Based on TMI 1.1.0, you will have to update it too.

  • 1.6.0 (27-12-2012)
    • Due to the interface update, this now works under CS:GO.
    • Added team swaps option. See :
      • ConVar tmc_allow_teamswaps
      • ConVar tmc_allow_teamswaps_instant
      • Command sm_swapteams
      • Command sm_swapteamsinstant
    • Due to team swaps, you should redownload phrases.
  • Added german translation. Thanks to micazoid. (29-12-2012)
  • 1.7.0 (03-10-2013)
    • The bomb is now dropped if someone is switched from a non-team TMC (target is player/clan). See tmc_dropc4ifct if you prefered the old behaviour.
    • Removed FCVAR_NOTIFY from non version ConVar.
    • Removed FCVAR_REPLICATED from version ConVar.
  • 1.8.0 (18-11-2013)
    • Now allows multitargets (i.e. "sm_iteamct @bots")
    • Since multitargets are allowed, translations are changed. You must redownload phrases. (Also please retranslate the missing german sentence micazoid ; marked with "todo" )
    • Corrected some sentences on "how to use" (when failing to use correctly a command).

Credits :
  • psychonic for being awesome.
  • micazoid for german translation.
  • codeye; thanks for the bug report (@C4)

Todo list :
  • Votescramble.
  • Balance teams. (very low priority)
  • "!trycheapbalance" (switches random dead dude to make team fair)
Attached Thumbnails
Click image for larger version

Name:	TMC_Prefix.png
Views:	1876
Size:	63.4 KB
ID:	102083   Click image for larger version

Name:	TeamsManagementMenu.png
Views:	905
Size:	62.8 KB
ID:	110569   Click image for larger version

Name:	Team.jpg
Views:	988
Size:	14.2 KB
ID:	110570   Click image for larger version

Name:	Player.png
Views:	860
Size:	97.3 KB
ID:	110571   Click image for larger version

Name:	Clan.png
Views:	967
Size:	96.9 KB
ID:	110572  

Attached Files
File Type: zip scripting.zip (18.0 KB, 667 views)
File Type: smx teamsmanagementcommands.smx (34.3 KB, 706 views)
File Type: txt teamsmanagementcommands.phrases.txt (13.0 KB, 616 views)
__________________
My plugins :
Red Maze
Afk Bomb
RAWR (per player/rounds Awp Restrict.)
Kill Assist
Be Medic

You can also Donate if you appreciate my work

Last edited by RedSword; 11-18-2013 at 10:11. Reason: 1.8.0; allow multitargets; 416tr/349p/396x
RedSword is offline