|
|
|
//char *mdls = g_engfuncs.pfnInfoKeyValue( //g_engfuncs.pfnGetInfoKeyBuffer( pPlayer->edict() ), "model" ); and /* char text[1024]; if ( !strcmp( mdls, pPlayer->m_szTeamName ) ) { sprintf( text, "* you are on team \'%s\'\n", pPlayer->m_szTeamName ); } else { sprintf( text, "* assigned to team %s\n", pPlayer->m_szTeamName ); } */And change the line
SetDefaultPlayerTeam( pPlayer ) to TeamWithFewestPlayers( );In the same file (teamplay_gamerules.cpp) goto the ChangePlayerTeam function and comment out
//g_engfuncs.pfnSetClientKeyValue( clientIndex, g_engfuncs.pfnGetInfoKeyBuffer( pPlayer->edict() ), "model", pPlayer->m_szTeamName ); //g_engfuncs.pfnSetClientKeyValue( clientIndex, g_engfuncs.pfnGetInfoKeyBuffer( pPlayer->edict() ), "team", pPlayer->m_szTeamName );And change the
MESSAGE_BEGIN( MSG_ALL, gmsgTeamInfo ); WRITE_BYTE( clientIndex ); WRITE_STRING( pPlayer->m_szTeamName ); MESSAGE_END();to
MESSAGE_BEGIN( MSG_ALL, gmsgTeamInfo ); WRITE_BYTE( NULL ); WRITE_STRING( pPlayer->m_szTeamName ); MESSAGE_END();Now for the big part! The ClientUserInfoChanged changed function (teamplay_gamerules.cpp). Comment out the WHOLE function. This is the function that prevented you from changing mdls if it was not your team (or changing teams if the mdl wasnt the same). Also to prevent people from choosing a model in your liblist.gam change the "nomodels" to 1. And thats it! This has been tested by me so it should work. Hopefully :) Good luck to all you coders out there!
Any questions or suggestions should be sent to me:
british@epix.net