lfnetwork.com mark read register faq members calendar

Thread: Question about TEAM
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 05-28-2007, 09:53 PM   #1
Cohsty243
Rookie
 
Cohsty243's Avatar
 
Join Date: Apr 2007
Posts: 67
Question about TEAM

How could I set something for client on each invividual team
Do I use this?
Code:
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:
Code:
if ( g_gametype.integer == ( GT_TEAM || GT_CTY || GT_CTF ) )
or this:
Code:
if ( (g_gametype.integer == GT_TEAM ) || ( g_gametype.integer == GT_CTY ) || (g_gametype.integer == GT_CTF ) )
What would be the better way to go?
Cohsty243 is offline   you may: quote & reply,
Old 05-28-2007, 11:19 PM   #2
Tinny
 
Tinny's Avatar
 
Join Date: Apr 2002
Posts: 1,188
( GT_TEAM || GT_CTY || GT_CTF ) ) this returns only a boolean I believe, so you must use the second way .


Redeemed!

An old school mod for jedi academy.
Tinny is offline   you may: quote & reply,
Old 05-28-2007, 11:27 PM   #3
Cohsty243
Rookie
 
Cohsty243's Avatar
 
Join Date: Apr 2007
Posts: 67
Great Thanks! ya its too bad it doesnt work the shorter way LoL. do you know anything about the team thing though?
Cohsty243 is offline   you may: quote & reply,
Old 05-29-2007, 01:29 PM   #4
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,162
Your team check should probably work. What are you trying to do?


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 05-29-2007, 03:48 PM   #5
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
if ( g_gametype.integer >= GT_TEAM && g_gametype.integer != GT_SIEGE ) would be more efficient. :S


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 05-29-2007, 07:09 PM   #6
Cohsty243
Rookie
 
Cohsty243's Avatar
 
Join Date: Apr 2007
Posts: 67
Thanks Ensiform, and Razorace, basically what i want to do is like
Code:
if ( client is on blue team )
{
    do this to the client
}
if ( client is on red team )
{
    do this to client
}
Cohsty243 is offline   you may: quote & reply,
Old 05-29-2007, 11:37 PM   #7
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
Code:
if ( ent->client->sess.sessionTeam == TEAM_RED ) {
   ...
} else if ( ent->client->sess.sessionTeam == TEAM_BLUE ) {
   ...
} else {
   ...
}


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 05-30-2007, 01:53 PM   #8
Cohsty243
Rookie
 
Cohsty243's Avatar
 
Join Date: Apr 2007
Posts: 67
ya, i did if and if again because i dont want an else. Could i just leave else blank?
Cohsty243 is offline   you may: quote & reply,
Old 05-30-2007, 02:50 PM   #9
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
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?


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 05-30-2007, 03:20 PM   #10
Cohsty243
Rookie
 
Cohsty243's Avatar
 
Join Date: Apr 2007
Posts: 67
Well, I want to set health and ammo and stuff separately for TEAM_RED and TEAM_BLUE.
Cohsty243 is offline   you may: quote & reply,
Old 05-31-2007, 02:18 PM   #11
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
Why not use a for loop?


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 05-31-2007, 11:28 PM   #12
Cohsty243
Rookie
 
Cohsty243's Avatar
 
Join Date: Apr 2007
Posts: 67
i could do that too but its already working anyway
Cohsty243 is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > JA Coding > Question about TEAM

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:38 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.