Raised This Month: $ Target: $400
 0% 

get team


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 06-05-2013 , 06:10   Re: get team
Reply With Quote #1

Quote:
Originally Posted by guipatinador View Post
With get_user_team( ) you can get the team name (string).
Not a problem.

PHP Code:
_get_client_teamIndexTeam[ ], Length )
{
  if( !
is_user_connectedIndex ) )
    return -
1;

  static const 
TeamNames[ ][ ] = { "UNASSIGNED""TERRORIST""CT""SPECTATOR" };
  static 
Team;

  
Team cs_get_user_teamIndex );

  if( 
Length )
    
formatexTeamLength"%s"TeamNamesTeam ] );

  return 
Team;

PHP Code:
// Returns the Counter-Strike purely team index
native cs_get_user_teamClient );

// Returns the team that is retrieved through different events like TeamInfo or ScoreInfo
native get_user_teamClientTeam[ ] = ""Length ); 
In my opinion, the best solution is retrieving the client's team index by cs_get_user_team.

Fake Meta fast conversion:

PHP Code:
_get_client_teamIndex )
{
  static const 
OFFSET_CSTEAMS 114;

  return 
is_user_connectedIndex ) ? get_pdata_intIndexOFFSET_CSTEAMS ) : -1;
}

_set_client_teamIndexTeam )
{
  static const 
OFFSET_CSTEAMS 114;

  return 
is_user_connectedIndex ) ? set_pdata_intIndexOFFSET_CSTEAMSTeam ) : -1;

__________________

Last edited by claudiuhks; 06-05-2013 at 06:28.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
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 16:23.


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