AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] SwapTeam Manager (https://forums.alliedmods.net/showthread.php?t=330137)

Teamkiller324 01-22-2021 02:35

[ANY] SwapTeam Manager
 
[ANY] SwapTeam Manager

Description
Manage teams, swap teams, exchange players teams, and force team on a target.
This is a standalone version of SwapTeam module from my All-In-One plugin "Random Commands Plugin" (unreleased).
Supporting translations, currently having swedish & english atm.

Games Currently Supported
1. Team Fortress 2
2. Team Fortress 2 Classic
3. Counter-Strike: Source
4. Counter-Strike: Global Offensive
5. Left 4 Dead
6. Left 4 Dead 2
7. Day of Defeat: Source
8. More to be supported later by suggestion

Commands
1. sm_swap - Swap a player to opposite team
2. sm_swapteam - Swap a player to opposite team
3. sm_switch - Swap a player to opposite team
4. sm_switchteam - Swap a player to opposite team
5. sm_exchange - Exchange a target to a clients team
6. sm_spec - Switch to spectators team
7. sm_switchspec - Switch a player to the spectators team
8. sm_swapteam - Switch a player to the spectators team
9. sm_forceteam - Force a team index on a client
10. sm_scramble - Scramble a player to a random team.
11. sm_scrambleteams - Scramble players to a random team.

ConVars
1. sm_swapteam_notify_swapteam - Determine if teamswaps shall be notified to everyone or just the client. Default: 1
2. sm_swapteam_notify_specteam - Determine if spectator teamswaps shall be notified to everyone or just the client. Default: 1
3. sm_swapteam_notify_exchangeteam - Determine if exchange teamswaps shall be notified to everyone or just the client. Default: 1
4. sm_swapteam_instant - Should team swaps be instant? (Teamchange without respawning) Default: 0
5. sm_swapteam_updatemodel - [CSS/CSGO] Should the players model get updated once swapped team? Default: 1

Dependencies
1. Tk Libraries - Required to compile the plugin.
2. Updater - Required to compile with and have updater support using the plugin.

Plans
1. Add team scramble command. Done
2. Implement an administration menu.

Changelog
Quote:


Version 1.3.2
+ Updated code.
+ Added Updater Support.
+ Added Danish translation. (Thanks to ksgoescoding).

Version 1.3.0
+ Fixed "CS_UpdateClientModel native not found" error bug (It's loaded even tough it shouldn't be able to be loaded on non-cs games).
+ Fixed cvars not functioning correctly.
+ Fixed messages to properly function and be shown correctly.
+ Updated & cleaned up the code.
+ Updated translations.

Version 1.2.0
+ Added Day of Defeat: Source Support.
+ Added Command sm_scramble - Scramble a player to random team.
+ Added Command sm_scrambleteams - Scramble players to a random team.
+ Fixed team swapping to work properly now.

Version 1.1.0
+ Added Left 4 Dead & Left 4 Dead 2 Support.
+ Updated Translation File.
+ Added Swedish Translation.
+ Updated The Code.
+ Updated sm_swapteam_notify.
+ Added ConVar sm_swapteam_notify_swapteam - Determine if teamswaps shall be notified to everyone or just the client.
+ Added ConVar sm_swapteam_notify_specteam - Determine if spectator teamswaps shall be notified to everyone or just the client.
+ Added ConVar sm_swapteam_notify_exchangeteam - Determine if exchange teamswaps shall be notified to everyone or just the client.
+ Added ConVar sm_swapteam_notify_forceteam - Determine if forced teamswaps shall be notified to everyone or just the client.
+ Compiling Now Requires Tk Libraries.
> Note: Be sure to delete your current plugin folder (/cfg/sourcemod/swapteam_manager.cfg) and restart the server or reload the plugin to configure the new convars.

Version 1.0.0
+ Release


GitHub Repository | Latest Release

Translations are welcome

SkiPlix 01-29-2021 06:15

Re: [ANY] SwapTeam Manager [Updated 22-01-21] Version 1.0.0
 
1 Attachment(s)
L4D2 Support, please?

Also here's the spanish translation since i don't know how to pull request/whatever and add the changes on Github...

ThatKidWhoGames 01-29-2021 13:40

Re: [ANY] SwapTeam Manager [Updated 22-01-21] Version 1.0.0
 
I could be wrong about this, but I noticed you put this into the code:
PHP Code:

public Extension __ext_tf2 =    {
    
name "TF2 Tools",        //This allows any game to load without "TF2 Tools Extension is required" error on plugin startup
    
file "game.tf2.ext",    //since the other games doesn't use the tf2 natives and the extension is automatically loaded
    
required 0            //when server is running team fortress 2
};

public 
Extension __ext_cstrike =    {
    
name "cstrike",
    
file "games/game.cstrike.ext",
    
required 0
}; 

I'm pretty sure you can just undefine the requirement of the extensions when you define the includes. Example:
PHP Code:

#undef REQUIRE_EXTENSIONS
#include <tf2_stocks>
#include <cstrike> 


DeUltima 02-23-2021 19:17

Re: [ANY] SwapTeam Manager [Updated 30-01-21] Version 1.1.0
 
I know it's an older game, but any chance you could add Day of Defeat Source support? I would love to give it a go on my server.

Teamkiller324 02-23-2021 19:51

Re: [ANY] SwapTeam Manager [Updated 30-01-21] Version 1.1.0
 
Quote:

Originally Posted by DeUltima (Post 2738037)
I know it's an older game, but any chance you could add Day of Defeat Source support? I would love to give it a go on my server.

Added :)

gamer_kanelita 02-24-2021 17:04

Re: [ANY] SwapTeam Manager [Updated 24-02-21] Version 1.2.0
 
Is there a way to get all those commands out in my admin menu? It is for L4D2 :(

Tonblader 05-06-2022 13:34

Re: [ANY] SwapTeam Manager
 
Left 4 Dead 2

Quote:

L 05/06/2022 - 12:27:19: [SM] Exception reported: Invalid Handle 0 (error: 4)
L 05/06/2022 - 12:27:19: [SM] Blaming: all\updater.smx
L 05/06/2022 - 12:27:19: [SM] Call stack trace:
L 05/06/2022 - 12:27:19: [SM] [0] ArrayList.Length.get
L 05/06/2022 - 12:27:19: [SM] [1] Line 10, updater/plugins.sp::GetMaxPlugins
L 05/06/2022 - 12:27:19: [SM] [2] Line 32, updater/plugins.sp::PluginToIndex
L 05/06/2022 - 12:27:19: [SM] [3] Line 51, updater/plugins.sp::Updater_AddPlugin
L 05/06/2022 - 12:27:19: [SM] [4] Line 25, updater/api.sp::Native_AddPlugin
L 05/06/2022 - 12:27:19: [SM] [6] Updater_AddPlugin
L 05/06/2022 - 12:27:19: [SM] [7] Line 88, D:\GitHub\Teamkiller324\SwapTeam-Manager\addons\sourcemod\scripting\swapteam_m anager.sp::OnPluginStart
L 05/06/2022 - 12:27:19: [SM] Unable to load plugin "all\swapteam_manager.smx": Error detected in plugin startup (see error logs)


All times are GMT -4. The time now is 23:33.

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