Raised This Month: $51 Target: $400
 12% 

[TF2] Team Changer for Mann Power


Post New Thread Reply   
 
Thread Tools Display Modes
Author
RaphtaliaTheTanooki
Member
Join Date: Jul 2020
Location: Brazil, Bahia
Plugin ID:
8012
Plugin Version:
1.0
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Allows players to change their team in Mann Power mode
    Old 03-24-2022 , 00:04   [TF2] Team Changer for Mann Power
    Reply With Quote #1

    This plugin was made because the change teams screen gets blocked when the cvar tf_powerup_mode is set to 1

    (this isn't my first plugin, but it's the first i publicly release, but still, report me anything unusual)



    !setteamdeprecated <blu/red> // This command is OBSOLETE, i can use me if you want to, but you should use my newer cousin instead
    !setmyteam // Allows the player using the command to change team



    To-Do:
    Implement MvM Check so you can't join blue... if needed

    Thanks to Mr_panica & Sreaper for the improvement

    Quote:
    1.1- Implemented a better way to change teams, the native jointeam command works too now
    note: i programmed this extremely tired there might be something wrong in this version...

    1.0- Initial Release
    Attached Files
    File Type: sp Get Plugin or Get Source (TeamChangeMannpower.sp - 127 views - 2.7 KB)
    __________________
    Discord: eridreemurr
    Github: https://github.com/StShAzzy/

    Last edited by RaphtaliaTheTanooki; 03-26-2022 at 14:07. Reason: 1.1 avaliable and i need to get better at understand my code
    RaphtaliaTheTanooki is offline
    Mr_panica
    Senior Member
    Join Date: Jan 2017
    Location: Russia, Saint-Petersburg
    Old 03-24-2022 , 16:11   Re: [TF2] Team Changer for Mann Power
    Reply With Quote #2

    You can use the panel for a prettier team selection.
    I haven't practiced writing code for a long time. So there may be bugs. The plugin should open the team selection panel for the player. The player can choose any of 3 teams.

    Spoiler
    __________________
    Sorry for my English.
    Mr_panica is offline
    Sreaper
    髪を用心
    Join Date: Nov 2009
    Old 03-24-2022 , 21:46   Re: [TF2] Team Changer for Mann Power
    Reply With Quote #3

    Quote:
    Originally Posted by Mr_panica View Post

    PHP Code:
            char GetTeam[1];
            
    GetCmdArgString(GetTeamsizeof(GetTeam));

            switch (
    GetTeam[0])
            {
                case 
    's'SetTeam TFTeam_Spectator;
                case 
    'r'SetTeam TFTeam_Red;
                case 
    'b'SetTeam TFTeam_Blue;
            } 
    change to:

    PHP Code:
            char GetTeam[2]; //2 so every door doesn't lead to TFTeam_Unassigned
            
    GetCmdArgString(GetTeamsizeof(GetTeam));

            switch (
    GetTeam[0])
            {
                case 
    's'SetTeam TFTeam_Spectator;
                case 
    'r'SetTeam TFTeam_Red;
                case 
    'b'SetTeam TFTeam_Blue;
                default: return 
    Plugin_Handled//do not want clients sent to TFTeam_Unassigned for using undefined arguments. ex: 'jointeam' by itself, 'jointeam potato'.
            


    Last edited by Sreaper; 03-24-2022 at 21:47.
    Sreaper is offline
    RaphtaliaTheTanooki
    Member
    Join Date: Jul 2020
    Location: Brazil, Bahia
    Old 03-26-2022 , 12:28   Re: [TF2] Team Changer for Mann Power
    Reply With Quote #4

    i'mma see what i can do, i can't guarantee i'll get it done correctly on 1st try, but i'll get there... eventually...
    RaphtaliaTheTanooki is offline
    RaphtaliaTheTanooki
    Member
    Join Date: Jul 2020
    Location: Brazil, Bahia
    Old 08-06-2022 , 22:49   Re: [TF2] Team Changer for Mann Power
    Reply With Quote #5

    so i figured out that the jointeam button is completely ignored by the game when tf_powerup_mode is set to 1, so the command is the only choice
    __________________
    Discord: eridreemurr
    Github: https://github.com/StShAzzy/
    RaphtaliaTheTanooki is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 02:47.


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