Doubt, one player from each team
I wanted to know if this code is correct to get a player's name from each team.
if (cs_get_user_team (ibestplayerT) == CS_TEAM_T) { get_user_name (ibestplayerT, xPlayerNameT, 31) } if (cs_get_user_team (ibestplayerCT) == CS_TEAM_CT) { get_user_name (ibestplayerCT, xPlayerNameCT, 31) } |
Re: Doubt, one player from each team
Why don't you test by yourself.
And also don't post multiple threads with the same topic. |
Re: Doubt, one player from each team
Use get_players native, it's better if you loop throughout a certain team.
https://forums.alliedmods.net/showthread.php?t=129484 |
Re: Doubt, one player from each team
That will work fine assuming ibestPlayerT and ibestplayerCT contain valid/connected player ID's on the applicable team. If this is the case, you do not even need to check their team since this has already been established. Another recommendation is to use charsmax( xPlayerNameT/CT ) instead of 31.
Better off showing actual code so we can provide the best method. |
All times are GMT -4. The time now is 12:55. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.