Cohsty243 Posted May 29, 2007 Share Posted May 29, 2007 How could I set something for client on each invividual team Do I use this? client->sess.sessionTeam == TEAM_BLUE I'm just guessing, because I don't even know what that is. lol. Also I have a question on another thing. Should I be using this: if ( g_gametype.integer == ( GT_TEAM || GT_CTY || GT_CTF ) ) or this: if ( (g_gametype.integer == GT_TEAM ) || ( g_gametype.integer == GT_CTY ) || (g_gametype.integer == GT_CTF ) ) What would be the better way to go? Link to comment Share on other sites More sharing options...
Tinny Posted May 29, 2007 Share Posted May 29, 2007 ( GT_TEAM || GT_CTY || GT_CTF ) ) this returns only a boolean I believe, so you must use the second way . Link to comment Share on other sites More sharing options...
Cohsty243 Posted May 29, 2007 Author Share Posted May 29, 2007 Great Thanks! ya its too bad it doesnt work the shorter way LoL. do you know anything about the team thing though? Link to comment Share on other sites More sharing options...
razorace Posted May 29, 2007 Share Posted May 29, 2007 Your team check should probably work. What are you trying to do? Link to comment Share on other sites More sharing options...
ensiform Posted May 29, 2007 Share Posted May 29, 2007 if ( g_gametype.integer >= GT_TEAM && g_gametype.integer != GT_SIEGE ) would be more efficient. :S Link to comment Share on other sites More sharing options...
Cohsty243 Posted May 29, 2007 Author Share Posted May 29, 2007 Thanks Ensiform, and Razorace, basically what i want to do is like if ( client is on blue team ) { do this to the client } if ( client is on red team ) { do this to client } Link to comment Share on other sites More sharing options...
ensiform Posted May 30, 2007 Share Posted May 30, 2007 if ( ent->client->sess.sessionTeam == TEAM_RED ) { ... } else if ( ent->client->sess.sessionTeam == TEAM_BLUE ) { ... } else { ... } Link to comment Share on other sites More sharing options...
Cohsty243 Posted May 30, 2007 Author Share Posted May 30, 2007 ya, i did if and if again because i dont want an else. Could i just leave else blank? Link to comment Share on other sites More sharing options...
ensiform Posted May 30, 2007 Share Posted May 30, 2007 you dont need to have an else but what are you doing it for that you wouldn't want to take into an account TEAM_FREE and TEAM_SPECTATOR? Link to comment Share on other sites More sharing options...
Cohsty243 Posted May 30, 2007 Author Share Posted May 30, 2007 Well, I want to set health and ammo and stuff separately for TEAM_RED and TEAM_BLUE. Link to comment Share on other sites More sharing options...
ensiform Posted May 31, 2007 Share Posted May 31, 2007 Why not use a for loop? Link to comment Share on other sites More sharing options...
Cohsty243 Posted June 1, 2007 Author Share Posted June 1, 2007 i could do that too but its already working anyway Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.