Raised This Month: $ Target: $400
 0% 

When client connects


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 08-02-2011 , 15:28   When client connects
Reply With Quote #1

In Counter-Strike, when a player is still loading the server (they say that when you reach the 3rd cube when connecting public client_connect() is being executed, if written in a plugin on a server), you can see the player in grey when pressing TAB. now, for that, I have 2 questions:

1. When player logs in and ppl see him in grey when hitting TAB, is his cs_get_user_team equals to CS_TEAM_SPECTATOR? or does he just have no team?

2. When you use get_players(), will it get that player in grey aswell as the other connected players?
Diegorkable is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 08-02-2011 , 15:35   Re: When client connects
Reply With Quote #2

i believe its CS_TEAM_UNASIGNED or w/e... its the 0 value i think...

Debug get_players.. run it and for loop it and print the users names of the ids... or the ids if you think you know them.
Doc-Holiday is offline
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 08-02-2011 , 15:42   Re: When client connects
Reply With Quote #3

alright, tyvm

i'll test the get_players later, if someone can save me time and give me the answer i'd be glad.
Diegorkable is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-02-2011 , 16:01   Re: When client connects
Reply With Quote #4

get_players() will return players as long as they are connected, regardless if they've yet selected a team. You can pass flags to only return players based on certain condition(s) that you specify, including whether or not they are on a particular team. See the function description. Just be careful when using multiple flags because it has been reported that certain combinations of flags will cause the function to not work as intended.
__________________
Bugsy 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 03:22.


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