Thread: Switching Teams

Results 1 to 7 of 7
  1. #1
    henkspamadres's Avatar
    Join Date
    May 2013
    Gender
    male
    Posts
    10
    Reputation
    10
    Thanks
    0

    Switching Teams

    I am working on an Infected mod.
    It works perfectly in a private match
    When somebody connects, he will be transfered to the survivor team (allies).
    when somebody gets infected, he switches to the infected (axis) team.
    this is also visible on the scoreboard (tab).

    The problem is public matches.

    When I host the mod in a public match, everybody end up in a "unknown" team.
    As in, crosshair and name will be red when you aim on somebody, and they show up as enemies on the UAV/map
    BUT... the game threads them as if they we're allies. (you cant kill a fellow survivor).
    furthermore, when you look at the scoreboard, everybody appears to be in the same team, a nameless team.

    So my quiestion is, how can i make everybody switch teams properly as in a private match?

  2. #2
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,112
    My Mood
    Angelic
    Quote Originally Posted by henkspamadres View Post
    I am working on an Infected mod.
    It works perfectly in a private match
    When somebody connects, he will be transfered to the survivor team (allies).
    when somebody gets infected, he switches to the infected (axis) team.
    this is also visible on the scoreboard (tab).

    The problem is public matches.

    When I host the mod in a public match, everybody end up in a "unknown" team.
    As in, crosshair and name will be red when you aim on somebody, and they show up as enemies on the UAV/map
    BUT... the game threads them as if they we're allies. (you cant kill a fellow survivor).
    furthermore, when you look at the scoreboard, everybody appears to be in the same team, a nameless team.

    So my quiestion is, how can i make everybody switch teams properly as in a private match?
    The game mode you start the game in, could be F-F-A

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  3. #3
    henkspamadres's Avatar
    Join Date
    May 2013
    Gender
    male
    Posts
    10
    Reputation
    10
    Thanks
    0
    No it isn't FFA, its Team Death Match. But it does look like an FFA scoreboard tbh.

    And like i said, it works fine in Private Match, untill I try it in a public match.

  4. #4
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,112
    My Mood
    Angelic
    Quote Originally Posted by henkspamadres View Post
    No it isn't FFA, its Team Death Match. But it does look like an FFA scoreboard tbh.

    And like i said, it works fine in Private Match, untill I try it in a public match.
    Hard to help without the code. (As it's mostly like something you have done wrong there)

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  5. #5
    henkspamadres's Avatar
    Join Date
    May 2013
    Gender
    male
    Posts
    10
    Reputation
    10
    Thanks
    0
    basiscly, there are three ways to switch teams:
    Code:
    self maps\mp\gametypes\_menus::addToTeam( "allies", true );
    This adds the player to a team, without respawning him, and it doesn't change the model of the player.
    In a privatematch this is enough (except for the player model). The player will now show up in the correct team on the scoreboard and stuff.

    the second and third method use the following function:
    Code:
    self notify("menuresponse", game["menu_team"], "axis");
    //and
    [[level.axis]]();
    The [[level.axis]]() is the same as self notify..... because the game binds the function to level.axis.

    Furthermore, I've set the following dvars:
    Code:
    setDvar("scr_teambalance", 0);
    setDvar("party_autoteams", 0);
    setDvar("party_maxTeamDiff", 18);
    setDvar("ui_allow_teamchange", "1");
    When a player needs to switch team, I either call the addtoteam() function or the level.<team>() function.
    The result is the same. It works, but the scoreboard is messed up.

    I think the problem is, that the game handles teams differently in a public match then it does in a private match, since my code works just fine in a private match.

  6. #6
    henkspamadres's Avatar
    Join Date
    May 2013
    Gender
    male
    Posts
    10
    Reputation
    10
    Thanks
    0
    A thing I forgot to mention:

    The UAV/map shows strange things aswell. Everybody who shoots shows up as a red dot, and friendlies do not show up at all.
    So, your uav is an empty map without the green triangles for friendles. And it shows a red dot if a team mate fires.
    Basicly, the uav thinks everybody is an enemy.

    Is this fixable?

  7. #7
    henkspamadres's Avatar
    Join Date
    May 2013
    Gender
    male
    Posts
    10
    Reputation
    10
    Thanks
    0
    *BUMP*
    could somebody help me out?

Similar Threads

  1. Glitch How To Switch Teams In Dragon Mode
    By xxpwnedbymex in forum Mission Against Terror Discussions
    Replies: 3
    Last Post: 11-23-2012, 03:42 AM
  2. Team Switch in game Effect
    By Daddi Breeze in forum Alliance of Valiant Arms (AVA) Discussions
    Replies: 5
    Last Post: 10-06-2012, 12:17 PM
  3. Force switching teams
    By prisma in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 3
    Last Post: 10-11-2010, 02:34 PM
  4. [SOLVED] [REQUEST] Switch team hack?
    By BananaBoy223 in forum Call of Duty Modern Warfare 2 Help
    Replies: 4
    Last Post: 06-20-2010, 06:14 AM
  5. Aimbot/switch teams
    By HACK! in forum CrossFire Hacks & Cheats
    Replies: 18
    Last Post: 08-12-2009, 04:40 PM