 |
|  |
| Read post before voting... |
| Good idea, let's do it. |
|
50% |
[ 9 ] |
| Change team names, but not daily. |
|
5% |
[ 1 ] |
| Leave team names as they are. |
|
33% |
[ 6 ] |
| Change team names, but don't change colors. |
|
11% |
[ 2 ] |
|
| Total Votes : 18 |
| Voter(s): wargasm, ed, kyle, Luzifer, sol, Super Duck!, syllabear, sebol158, ChiCho, xs20, xevic, Infamous, P4, dr.fux, Scorch, longball_lasch, loops, $ubzero |
|
  
| CT Rank: 6 |
| Field's place: def-sweep |
| Grid Name: CT~Voodoo |
| GID: Voodoo@ct/jedi |
| CT Wild Fort Rank: na |
| Joined: 05 May 2006 |
| Posts: YK361244 Posts |
Location: somewhere on earth
|
|
Posted: Thu Oct 12, 2006 12:03 am |
|
done.
add this below se_team_name declaration in eTeam.cpp :
static tString se_team_name_param[TEAMCOLORS]=
{ static_cast<tString>(""),
static_cast<tString>(""),
static_cast<tString>(""),
static_cast<tString>(""),
static_cast<tString>(""),
static_cast<tString>(""),
static_cast<tString>(""),
static_cast<tString>("")
};
static tSettingItem<tString> se_team1_nameConf( "TEAM1_NAME", se_team_name_param[0] );
static tSettingItem<tString> se_team2_nameConf( "TEAM2_NAME", se_team_name_param[1] );
static tSettingItem<tString> se_team3_nameConf( "TEAM3_NAME", se_team_name_param[2] );
static tSettingItem<tString> se_team4_nameConf( "TEAM4_NAME", se_team_name_param[3] );
static tSettingItem<tString> se_team5_nameConf( "TEAM5_NAME", se_team_name_param[4] );
static tSettingItem<tString> se_team6_nameConf( "TEAM6_NAME", se_team_name_param[5] );
static tSettingItem<tString> se_team7_nameConf( "TEAM7_NAME", se_team_name_param[6] );
static tSettingItem<tString> se_team8_nameConf( "TEAM8_NAME", se_team_name_param[7] );
static int se_team_red_param[TEAMCOLORS]={0,0,0,0,0,0,0,0};
static tSettingItem<int> se_team1_redConf( "TEAM1_RED", se_team_red_param[0] );
static tSettingItem<int> se_team2_redConf( "TEAM2_RED", se_team_red_param[1] );
static tSettingItem<int> se_team3_redConf( "TEAM3_RED", se_team_red_param[2] );
static tSettingItem<int> se_team4_redConf( "TEAM4_RED", se_team_red_param[3] );
static tSettingItem<int> se_team5_redConf( "TEAM5_RED", se_team_red_param[4] );
static tSettingItem<int> se_team6_redConf( "TEAM6_RED", se_team_red_param[5] );
static tSettingItem<int> se_team7_redConf( "TEAM7_RED", se_team_red_param[6] );
static tSettingItem<int> se_team8_redConf( "TEAM8_RED", se_team_red_param[7] );
static int se_team_green_param[TEAMCOLORS]={0,0,0,0,0,0,0,0};
static tSettingItem<int> se_team1_greenConf( "TEAM1_GREEN", se_team_green_param[0] );
static tSettingItem<int> se_team2_greenConf( "TEAM2_GREEN", se_team_green_param[1] );
static tSettingItem<int> se_team3_greenConf( "TEAM3_GREEN", se_team_green_param[2] );
static tSettingItem<int> se_team4_greenConf( "TEAM4_GREEN", se_team_green_param[3] );
static tSettingItem<int> se_team5_greenConf( "TEAM5_GREEN", se_team_green_param[4] );
static tSettingItem<int> se_team6_greenConf( "TEAM6_GREEN", se_team_green_param[5] );
static tSettingItem<int> se_team7_greenConf( "TEAM7_GREEN", se_team_green_param[6] );
static tSettingItem<int> se_team8_greenConf( "TEAM8_GREEN", se_team_green_param[7] );
static int se_team_blue_param[TEAMCOLORS]={0,0,0,0,0,0,0,0};
static tSettingItem<int> se_team1_blueConf( "TEAM1_BLUE", se_team_blue_param[0] );
static tSettingItem<int> se_team2_blueConf( "TEAM2_BLUE", se_team_blue_param[1] );
static tSettingItem<int> se_team3_blueConf( "TEAM3_BLUE", se_team_blue_param[2] );
static tSettingItem<int> se_team4_blueConf( "TEAM4_BLUE", se_team_blue_param[3] );
static tSettingItem<int> se_team5_blueConf( "TEAM5_BLUE", se_team_blue_param[4] );
static tSettingItem<int> se_team6_blueConf( "TEAM6_BLUE", se_team_blue_param[5] );
static tSettingItem<int> se_team7_blueConf( "TEAM7_BLUE", se_team_blue_param[6] );
static tSettingItem<int> se_team8_blueConf( "TEAM8_BLUE", se_team_blue_param[7] );
and replace update_appearance function by this :
// update name and color
void eTeam::UpdateAppearance()
{
unsigned short oldr = r, oldg = g, oldb = b;
ePlayerNetID* oldest = OldestHumanPlayer();
if ( !oldest )
{
oldest = OldestAIPlayer();
}
// vote on team name: color or leader?
int voteName = 0;
int i;
for ( i = players.Len()-1; i>=0; --i )
{
if ( players(i)->IsHuman() && ( players(i) != oldest && players(i)->nameTeamAfterMe ) )
voteName++;
}
bool nameTeamColor = players.Len() > 1 && ( voteName * 2 < players.Len() || !oldest );
if ( !IsHuman() )
nameTeamColor = false;
if ( !se_allowTeamNameColor )
nameTeamColor = false;
if ( !se_allowTeamNamePlayer )
nameTeamColor = true;
nameTeamColor = NameTeamAfterColor ( nameTeamColor );
if ( oldest )
{
if ( nameTeamColor )
{
// team name determined by color
tOutput newname;
// Change by voodoo
// newname << se_team_name[ colorID ];
newname << se_team_name_param[ colorID ];
name = newname;
// Change by voodoo
// r = se_team_rgb[colorID][0];
// g = se_team_rgb[colorID][1];
// b = se_team_rgb[colorID][2];
r = se_team_red_param[colorID];
g = se_team_green_param[colorID];
b = se_team_blue_param[colorID];
}
else
{
// let oldest player own a human team
if ( IsHuman() )
{
if ( players.Len() > 1 )
{
if ( sn_GetNetState() != nSERVER )
oldest->UpdateName();
tOutput newname;
newname.SetTemplateParameter( 1, oldest->GetName() );
newname << "$team_owned_by";
name = newname;
}
else
{
name = oldest->GetName();
}
}
else
{
// it's the AI team
name = tOutput("$team_ai");
}
r = oldest->r;
g = oldest->g;
b = oldest->b;
// update colored player names
if ( sn_GetNetState() != nSERVER )
{
for ( i = players.Len()-1; i>=0; --i )
{
players(i)->UpdateName();
}
}
}
}
else
{
// empty team
name = tOutput("$team_empty");
r = g = b = 7;
}
/* z-man: no longer required
// make the oldest player spawn in front
if ( oldest )
{
int max = players.Len()-1;
int real = oldest->teamListID;
if ( real < max )
{
players(max)->teamListID = real;
oldest->teamListID = max;
players(real) = players(max);
players(max) = oldest;
}
}
*/
if ( nSERVER == sn_GetNetState() )
RequestSync();
// update team members if the color changed
if ( oldr != r || oldg != g || oldb != b )
{
for ( int i = players.Len() - 1; i >= 0; --i )
{
players(i)->UpdateName();
}
}
}
add this to autoexec.cfg (or any valid config file) and set it as you like :
# Teams name and colors settings ...
TEAM1_NAME "Team blue"
TEAM1_RED 4
TEAM1_GREEN 8
TEAM1_BLUE 15
TEAM2_NAME "Team gold"
TEAM2_RED 15
TEAM2_GREEN 15
TEAM2_BLUE 4
TEAM3_NAME "Team red"
TEAM3_RED 15
TEAM3_GREEN 4
TEAM3_BLUE 4
TEAM4_NAME "Team green"
TEAM4_RED 4
TEAM4_GREEN 15
TEAM4_BLUE 4
TEAM5_NAME "Team violet"
TEAM5_RED 15
TEAM5_GREEN 4
TEAM5_BLUE 15
TEAM6_NAME "Team ugly"
TEAM6_RED 4
TEAM6_GREEN 15
TEAM6_BLUE 15
TEAM7_NAME "Team white"
TEAM7_RED 15
TEAM7_GREEN 15
TEAM7_BLUE 15
TEAM8_NAME "Team black"
TEAM8_RED 7
TEAM8_GREEN 7
TEAM8_BLUE 7 |
|
|
|
Ex-CTer
| CT Rank: Not a CTer |
| Field's place: |
| Grid Name: syllabear |
| GID: syllabear@ct/public |
| CT Wild Fort Rank: na |
| Joined: 14 May 2006 |
| Posts: 16F361527 Posts |
Location: UK
|
|
Posted: Thu Oct 12, 2006 3:50 am |
|
HOLY CRAP I DIDNT UNDERSTAND THIS WHOLE TOPIC! AND I THOUGHT I WAS GOOD AT COMPUTERS!!!!!!!!!!!!
 voodoo i understand the last bit about autoexec.cfg and the team colours etc
u should be a server tech/ techie! |
|
_________________ Ex- [CT]Syllabear
Ex- [FE]Syllabear (leader)
A key that opens many doors is a master key. A lock that is opened by many keys is a shit lock
|
|
Ex-CTer
| CT Rank: Not a CTer |
| Field's place: |
| Grid Name: |
| GID: dr.fux@ct/public |
| CT Wild Fort Rank: |
| Joined: 04 Jul 2006 |
| Posts: 2G3688 Posts |
Location: Winterthur, Switzerland
|
|
Posted: Thu Oct 12, 2006 6:53 am |
|
kewl voodoo!
did u play with arma code earlier before, or was this your first time? looks good!
Was this C++ ?? |
|
_________________ getting fuxed is a matter of attitude...
...and of course topic.
|
  
| CT Rank: 6 |
| Field's place: def-sweep |
| Grid Name: CT~Voodoo |
| GID: Voodoo@ct/jedi |
| CT Wild Fort Rank: na |
| Joined: 05 May 2006 |
| Posts: YK361244 Posts |
Location: somewhere on earth
|
|
Posted: Thu Oct 12, 2006 2:35 pm |
|
Well here a few answers :
Yes, that's C++ (arma is no  )
I'm checking arma coding and play a bit with it. Im quite comfortable with settings stuff...
I just add the new settings (biggest part) and change a few lines in a function to set new vars instead of old one. No big deal.
Thx for including me in the tech team  |
|
|
|
Ex-CTer
| CT Rank: Not a CTer |
| Field's place: |
| Grid Name: syllabear |
| GID: syllabear@ct/public |
| CT Wild Fort Rank: na |
| Joined: 14 May 2006 |
| Posts: 16F361527 Posts |
Location: UK
|
|
Posted: Fri Oct 13, 2006 12:05 am |
|
good job! |
|
_________________ Ex- [CT]Syllabear
Ex- [FE]Syllabear (leader)
A key that opens many doors is a master key. A lock that is opened by many keys is a shit lock
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
All times are GMT
Page 4 of 5
|
|
|
|
|  |