AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   get user team (https://forums.alliedmods.net/showthread.php?t=140033)

SaM.ThE.MaN 10-08-2010 10:05

get user team
 
Hi,

I would like to ask ... Which is the best way to get user team ?

I used cs_get_user_team ... but i would like to know if there is a better one .

YamiKaitou 10-08-2010 10:15

Re: get user team
 
If you are using CStrike/CZero, cs_get_user_team is best

SpeeDeeR 10-08-2010 10:16

Re: get user team
 
There isn't better way.Alternative :
PHP Code:

get_user_team(index) == // for T
                              
== //for CT 


YamiKaitou 10-08-2010 10:20

Re: get user team
 
Quote:

Originally Posted by SpeeDeeR (Post 1318963)
Alternative :
PHP Code:

get_user_team(index) == // for T
                              
== //for CT 


Be careful with this one on CS/CZ as it is known to return false positives sometimes. There is a plugin that helps fix it though.

SaM.ThE.MaN 10-08-2010 10:26

Re: get user team
 
example ... i wanna get a users team ... his model is gign

cs_get_user_team(id, "gign" , 32)

is this how i am supposed to do it? and can you tell me what len is , i tried to search for it , all i reached to was nothing

YamiKaitou 10-08-2010 10:40

Re: get user team
 
Model's do not determine the team, therefore you can not use cs_get_user_team in that fashion. You have to use cs_get_user_model to get the model of a player.

SaM.ThE.MaN 10-08-2010 15:33

Re: get user team
 
well then can you gimme an example of cs_get_user_team? ... and i still did not understand what Len is for and what it does

YamiKaitou 10-08-2010 15:46

Re: get user team
 
http://www.amxmodx.org/funcwiki.php?...team&go=search

I have no idea where you are getting Len from

matsi 10-08-2010 16:08

Re: get user team
 
Quote:

Originally Posted by YamiKaitou (Post 1319332)
http://www.amxmodx.org/funcwiki.php?...team&go=search

I have no idea where you are getting Len from

cs_get_user_model ( index, model[], len )

Bugsy 10-08-2010 16:17

Re: get user team
 
Quote:

Originally Posted by matsi (Post 1319346)
cs_get_user_model ( index, model[], len )

He is referring to len in cs get user team (which doesn't exist). Obviously there is a len param when retrieving a string in cs get user model.


All times are GMT -4. The time now is 10:20.

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