Raised This Month: $51 Target: $400
 12% 

player_team L4D2


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Erik V
Member
Join Date: Oct 2009
Old 12-15-2009 , 16:54   player_team L4D2
Reply With Quote #1

Basically I want to set a variable at the start of a round, so I know who is on each team. I can either do this in round_start which does not have the "team" event int, as player_team does, or I can just use player_team if it is fired somewhere near the beginning of a round or map.

Is the player_team event fired by the game, before a round starts?
Erik V is offline
Bigbuck
Senior Member
Join Date: Jul 2009
Old 12-15-2009 , 20:01   Re: player_team L4D2
Reply With Quote #2

Could you use GetClientTeam for what you want to do?
Bigbuck is offline
Erik V
Member
Join Date: Oct 2009
Old 12-15-2009 , 20:40   Re: player_team L4D2
Reply With Quote #3

of course, but if player_team is called in the start I can just skip round_start because player_team has the "team" int.

So back to my original question as to whether player_team is fired at the beginning of each round?
Erik V is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 12-15-2009 , 22:00   Re: player_team L4D2
Reply With Quote #4

round_start isn't triggered once for every client, so there's no need for a "team" event int. Just use round_start and loop through all players and check their team with GetClientTeam like Bigbuck said.
bl4nk is offline
Erik V
Member
Join Date: Oct 2009
Old 12-15-2009 , 23:30   Re: player_team L4D2
Reply With Quote #5

TY for the responses, but I still did not get an answer to the question as to whether or not player_team is fired near the beginning of each round. I wanted to use just the player_team so I would not have to check in 2 different event hooks. No need to check the team in round_start if player_team fires in the beginning, because I will be using player_team anyway in case their is a team change in the middle of the round. Does anybody know?

Last edited by Erik V; 12-15-2009 at 23:34.
Erik V is offline
Bigbuck
Senior Member
Join Date: Jul 2009
Old 12-16-2009 , 00:12   Re: player_team L4D2
Reply With Quote #6

I'd suggest hooking both events and just have them log a message with a time stamp of something similar. That way you would know for sure when an event is being triggered.
Bigbuck is offline
Reply



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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:26.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode