AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:S/GO+DoD:S] Teams Management Commands (1.8.0 out; multitargets) (https://forums.alliedmods.net/showthread.php?t=182474)

RedSword 04-10-2012 01:35

[CS:S/GO+DoD:S] Teams Management Commands (1.8.0 out; multitargets)
 
8 Attachment(s)
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 :3 ; 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)

angel635 04-10-2012 07:13

Re: [CS:S] Teams Management Commands
 
1 Attachment(s)
Plugin failed to compile! Please try contacting the author.


Compiled :

RedSword 04-10-2012 09:24

Re: [CS:S] Teams Management Commands
 
Quote:

Originally Posted by angel635 (Post 1685955)
Plugin failed to compile! Please try contacting the author.


Compiled :

I forgot to say you need the .inc from Teams Management Interface to compile. I'm not at home currently so you'll need to compile locally. Sorry for the inconvenience.

angel635 04-10-2012 09:41

Re: [CS:S] Teams Management Commands
 
1 Attachment(s)
hi ^^

Compiled :

RedSword 04-10-2012 12:45

Re: [CS:S] Teams Management Commands
 
Quote:

Originally Posted by angel635 (Post 1686032)
hi ^^

Compiled :

I just downloaded Sourcemod, SDKHooks and my interface and got it to compile first shot... So I bet you didn't read the steps to install my interface and forgot the SDKHooks...

Also, my interface is already compiled, you do not need to recompile it.

EDIT : Compiled the plugin so the .smx is now available.

RedSword 04-11-2012 00:27

Re: [CS:S] Teams Management Commands (1.1.0 out : Added indiv. team's change)
 
1.1.0 is out :
  • Removed CS: Source dependency to compile.
  • Added individual team's switch.
  • Changed CVars for verbose, as now there is one for global Teams Management, as well as one for individual Teams Management.
  • Changed translations. You need to redownload phrases.

RedSword 04-12-2012 20:17

Re: [CS:S] Teams Management Commands (1.2.0 out)
 
1.2.0 is out :
  • Changed sm_changeteam, so the player will be in its current opposite team, rather than the futur opposite team (if a global TM or the player switches itself :$)
  • Now renewing menu when a player is transfered. This allow to switch more than one player really more easily (like when slapping someone by the menu).
  • Made the renewed menu show the players' futur team when browsing the menu for Teams Management. Inspired from MAP. See TMC_Prefix.png for an example.
  • Changed translations (changed sm_changeteam phrases). I recommend to update them (not obligatory).

EDIT (13-04-2012) ; quote from here :
Quote:

Originally Posted by Dr!fter (Post 1688445)
You shouldn't add a command listener for say/say_team. If your register a command with sm_ in front example sm_cake. !cake and /cake in chat should work automatically. It isn't limited to only admin commands. Also more nit picking but why provide a cvar to change the flag and provide an override? If they want to override just change the flag. Or just provide the override string and let them override and get rid of both cvars :P. Other than that looks good.

1.2.1 si out
  • 1.2.1 Added "say !ccteam USER" to cancel a player's team's change. Also removed a lot of useless RegAdminCmd() in the code ("sm_" is registering "!"; for both RegConsoleCmd AND RegAdminCmd also :$). Updating isn't really needed.

RedSword 05-18-2012 14:30

Re: [CS:S] Teams Management Commands (1.3.0 out; added clans cmds)
 
1.3.0 is out :
  • Added Clan support :
    • sm_clanteamt <tag>
    • sm_clanteamct <tag>
    • sm_clanchangeteam <tag>
    • sm_clancancelchangeteam <tag>
    • All the above will fail or target tagless people if the targeted clan has a quote in its name. That's why all the above's chat access is disabled by default using "tmc_allow_clanchangeteam 0".
    • However, all the above is available by default throughout the menu and should be failsafe ("tmc_allow_clanchangeteam_menu 0" to disable).
  • All the clan thing is available only in CS: Source.
  • Since new commands are there, redownloading translation is needed.
  • Reworked some phrases and optimized few things (new --> decl).

musosoft 09-22-2012 09:30

Re: [CS:S] Teams Management Commands (1.3.0 out; added clans cmds)
 
Please add sm_teamspec (option to move player to spectators team). Thanks

RedSword 09-22-2012 12:09

Re: [CS:S] Teams Management Commands (1.3.0 out; added clans cmds)
 
Quote:

Originally Posted by musosoft (Post 1803912)
Please add sm_teamspec (option to move player to spectators team). Thanks

I guess you want the switch to be instant ?


All times are GMT -4. The time now is 03:31.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.