Getting Player Team in CS
#1
I'm used to curteam... only I figured out that doesn't work in 1.1.0.4 (returns local player's team)

And I tried to look up the function in SVN... it is in compatibility.cfg and uses weird aliases -- player and team (but not the team that asigns your team somehow) and also player1 is an alias.

I'm don't know. I'm confused how that works, but really I'd like to know if it is currently possible to retrieve a players team in 1.1.0.4.

plzkthx
Thanks given by:
#2
iirc, it goes like this:

player cn <attr>

so probably this:

player 1 TEAM.

That was implemented in the current SVN. iirc team does a SWITCHTEAM


in current SVN, look at one of the pstat's. Look at the 1104 docs or the 1104 source for that.
Thanks given by:
#3
pstat_score works in 1.1.0.4? Okay. Will try tomorrow. Thanks.
Thanks given by:
#4
Yer, (at (pstat_score CN) 4) for 1.1.0.4, (player CN team) for SVN.

Edit:

Basically, the (player) and (player1) aliases in SVN have replaced pstat_score and other now redundant 1.1.0.4 idents. They are used to get information about the local player (player1) and remote players (player).

Ex:

[cubescript]
loop i 21 [
if (isclient $i) [ echo (player $i name) has (player $i tks) teamkills. ]
]
[/cubescript]

The above code would loop through all players and output their number of teamkills.

[cubescript]
player_attrs = "team frags deaths flags tks"

loop i (listlen $player_attrs) [
echo (player1 name) (at $player_attrs $i) --- (player1 (at $player_attrs $i))
]
[/cubescript]

The above code should output some information about you (player1); the output might look like:

Bukz team --- 0 // meaning I'm on team CLA.
Bukz frags --- 3
Bukz deaths --- 3
Bukz flags --- 1
Bukz tks --- 1
Thanks given by:
#5
Thanks Bukz. Take a look in the PG for what I used it for.
And I will try to get documentation for you know what tomorrow :)
Thanks given by: