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?
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.
basiscly, there are three ways to switch teams:
This adds the player to a team, without respawning him, and it doesn't change the model of the player.Code:self maps\mp\gametypes\_menus::addToTeam( "allies", true );
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:
The [[level.axis]]() is the same as self notify..... because the game binds the function to level.axis.Code:self notify("menuresponse", game["menu_team"], "axis"); //and [[level.axis]]();
Furthermore, I've set the following dvars:
When a player needs to switch team, I either call the addtoteam() function or the level.<team>() function.Code:setDvar("scr_teambalance", 0); setDvar("party_autoteams", 0); setDvar("party_maxTeamDiff", 18); setDvar("ui_allow_teamchange", "1");
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.
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?
*BUMP*
could somebody help me out?