Raised This Month: $ Target: $400
 0% 

How to get user real team?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wwzw
Member
Join Date: Feb 2009
Old 01-30-2012 , 21:10   How to get user real team?
Reply With Quote #1

I use get_user_team(id) can return a player's team.

But when a player change he's team (press "m"), get_user_team(id) return value is he's old team .

Can I get player's real team ?

Please help me ! Thanks !
wwzw is offline
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 01-30-2012 , 21:29   Re: How to get user real team?
Reply With Quote #2

You could try this module
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 01-30-2012 , 23:02   Re: How to get user real team?
Reply With Quote #3

For CS it's cs_get_user_team() and there are some other mod specific functions, see funcwiki.
__________________

Last edited by Hunter-Digital; 01-30-2012 at 23:03.
Hunter-Digital is offline
wwzw
Member
Join Date: Feb 2009
Old 01-31-2012 , 02:03   Re: How to get user real team?
Reply With Quote #4

Quote:
Originally Posted by Hunter-Digital View Post
For CS it's cs_get_user_team() and there are some other mod specific functions, see funcwiki.
now I use :
PHP Code:
cs2_get_user_team(id)
{
 switch(
cs_get_user_team(id))
 {
  case 
CS_TEAM_UNASSIGNED: return 0;
  case 
CS_TEAM_T: return 1;
  case 
CS_TEAM_CT: return 2;
  case 
CS_TEAM_SPECTATOR: return 3;
 }
 return 
0;

Right or wrong ?
wwzw is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-31-2012 , 02:25   Re: How to get user real team?
Reply With Quote #5

Quote:
Originally Posted by wwzw View Post
now I use :
PHP Code:
cs2_get_user_team(id)
{
 switch(
cs_get_user_team(id))
 {
  case 
CS_TEAM_UNASSIGNED: return 0;
  case 
CS_TEAM_T: return 1;
  case 
CS_TEAM_CT: return 2;
  case 
CS_TEAM_SPECTATOR: return 3;
 }
 return 
0;

Right or wrong ?
Pointless. Just use cs_get_user_team() as is with the CS_TEAM_* constants.
__________________
fysiks is offline
wwzw
Member
Join Date: Feb 2009
Old 01-31-2012 , 01:44   Re: How to get user real team?
Reply With Quote #6

Hunter-Digital:
Thank you very much ! cs_get_user_team() is good !
wwzw is offline
wwzw
Member
Join Date: Feb 2009
Old 01-31-2012 , 03:52   Re: How to get user real team?
Reply With Quote #7

I need to return the number result 0-3 to use for array .
wwzw is offline
Old 01-31-2012, 09:29
hleV
This message has been deleted by hleV. Reason: Too late.
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-31-2012 , 05:47   Re: How to get user real team?
Reply With Quote #9

It returns already such number, it's just tagged with CsTeams.
__________________
Arkshine is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-31-2012 , 09:29   Re: How to get user real team?
Reply With Quote #10

Code:
#define cs2_get_user_team(%1) (_:cs_get_user_team(%1))
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 00:20.


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