how do you detect what team a player is on that threw a gren
Posted: Sun Sep 04, 2011 6:41 am
(This seems very basic to me, but I haven't been able to find it in lots of searching)
In CG_Missile() in cg_ents.c, my mod has smoke grenades that you can throw. I need to do:
switch ( PlayerTeam ) {
case TEAM_RED:
etc...
But I don't know how to get the player's team? I tried to get clientnum and check from that but it seems to be the number of the grenade itself not the player.
I want the smoke to be blue when the player who threw the smoke grenade is on the blue team, and red when he's on the red team, and the only part I haven't figured out about that is knowing which team they are on.
In CG_Missile() in cg_ents.c, my mod has smoke grenades that you can throw. I need to do:
switch ( PlayerTeam ) {
case TEAM_RED:
etc...
But I don't know how to get the player's team? I tried to get clientnum and check from that but it seems to be the number of the grenade itself not the player.
I want the smoke to be blue when the player who threw the smoke grenade is on the blue team, and red when he's on the red team, and the only part I haven't figured out about that is knowing which team they are on.