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

Auto Switch Teams Every X Rounds


Post New Thread Reply   
 
Thread Tools Display Modes
Lucky888
Senior Member
Join Date: Nov 2011
Location: Paradise
Old 07-22-2014 , 11:46   Re: Auto Switch Teams Every X Rounds
Reply With Quote #41

Thanks for your good plugins!
__________________
Lucky888 is offline
Send a message via Yahoo to Lucky888
BaD CopY
Senior Member
Join Date: Oct 2014
Location: Home
Old 03-11-2015 , 13:09   Re: Auto Switch Teams Every X Rounds
Reply With Quote #42

Can anyone create plugin who switch teams if terrorist team won 3 rounds in row ?
BaD CopY is offline
Send a message via Yahoo to BaD CopY Send a message via Skype™ to BaD CopY
wpkidd
Junior Member
Join Date: May 2007
Old 07-26-2015 , 10:31   Re: Auto Switch Teams Every X Rounds
Reply With Quote #43

I have problem when teams switch the score doesnt how do i fix this
wpkidd is offline
RichNagel
Member
Join Date: Feb 2012
Location: Crystal River, Florida
Old 06-02-2016 , 20:15   Re: Auto Switch Teams Every X Rounds
Reply With Quote #44

Sorry for dredging up this old(er) thread, but I was wondering if anyone could modify this plugin to function with Day Of Defeat (if possible)?
__________________
RichNagel is offline
Send a message via ICQ to RichNagel Send a message via AIM to RichNagel
Spirit_12
Veteran Member
Join Date: Dec 2012
Location: Toronto, CA
Old 06-04-2016 , 01:08   Re: Auto Switch Teams Every X Rounds
Reply With Quote #45

Quote:
Originally Posted by RichNagel View Post
Sorry for dredging up this old(er) thread, but I was wondering if anyone could modify this plugin to function with Day Of Defeat (if possible)?
Not sure if the event is present in DOD, but if its the same then this is the only part you would want to edit.

PHP Code:
switch( cs_get_user_teamid ) )
    {
        case 
CS_TEAM_CTcs_set_user_teamidCS_TEAM_T );
        
        case 
CS_TEAM_Tcs_set_user_teamidCS_TEAM_CT );
    } 
You need to use DOD team natives.
__________________
Spirit_12 is offline
RichNagel
Member
Join Date: Feb 2012
Location: Crystal River, Florida
Old 06-04-2016 , 12:32   Re: Auto Switch Teams Every X Rounds
Reply With Quote #46

Many thanks for the info That is what I was thinking as well. There seem to be comparable events for DoD, but "dod_get_user_team" is deprecated, so I'm thinking that I need to change that to "get_user_team".

Of course, I also had to remove "#include <cstrike>", and add "#include <dodx>" and "#include <dodfun>" as well.

That being said, this is what I came up with:

PHP Code:
public changeTeamid )
{
    switch( 
get_user_teamid ) )
    {
        case 
ALLIESdod_set_user_teamidAXIS );
        
        case 
AXISdod_set_user_teamidALLIES );
    }

    
roundnumber 0;

The problem now is that it seems that "round" (or "round number") is not valid for DoD. The plugin compiles and loads properly, but even after all of the game objectives are accomplished on the map (flag cap out, etc...), the teams don't switch.

I also noticed that when using "say /roundnumber" it always displays "0", which also leads me to believe that "round" isn't valid for DoD.

Side note:

"fysiks" coded a plugin for me that would cycle to the next map when all of the objectives for the map are complete ( https://forums.alliedmods.net/showth...99131?t=199131 ), but I have NO idea what portions from the source of that plugin would be required to detect when all of the objectives are accomplished (to use those for the "roundnumber" event).
__________________

Last edited by RichNagel; 06-04-2016 at 12:34.
RichNagel is offline
Send a message via ICQ to RichNagel Send a message via AIM to RichNagel
RichNagel
Member
Join Date: Feb 2012
Location: Crystal River, Florida
Old 06-04-2016 , 22:21   Re: Auto Switch Teams Every X Rounds
Reply With Quote #47

UPDATE:

I changed:

register_logevent( "roundend", 2, "1=Round_End" );

TO:

register_event("RoundState", "roundend", "a", "1=3", "1=4", "1=5");

...and it DOES indeed function

Although, now I seem to have another problem. I use SturmBot for my AI bots, and after the team switch they are "stuck on stupid" LOL.

The OPPOSITE team responds to my voice commands (TRAITORS! LOL!), and they attempt to cap flags that have already been capped... they just run around the flag attempting to cap it, as they THINK that they are STILL on the opposite team.

In Sturmbot I can type "BOTS" in the consoles, and it lists all of the bots in the game, as well as their team and class. After the team switch, the in-game scoreboard indeed reflects the switch, but the "BOTS" SturmBot command still lists them as on the original team.

In other words, even though all of the bots on each team have switched sides, they "THINK" that they are STILL on the ORIGINAL team LOL.

NOW FOR THE WEIRD THING:

Using the "AMX Player Menu" I can actually transfer a bot to the other side, and he behaves normally. I'm guessing that the "AMX Player Menu" does the transfer differently than this plugin does ("dod_set_user_team"), but I don't know.
__________________

Last edited by RichNagel; 06-04-2016 at 22:22.
RichNagel is offline
Send a message via ICQ to RichNagel Send a message via AIM to RichNagel
robinxx
New Member
Join Date: Nov 2016
Old 11-09-2016 , 06:35   Re: Auto Switch Teams Every X Rounds
Reply With Quote #48

please Can you change the exchange of team points too?
robinxx 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 07:29.


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