Posts: 756
Threads: 53
Joined: Nov 2011
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
Posts: 3,462
Threads: 72
Joined: Jun 2010
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.
Posts: 756
Threads: 53
Joined: Nov 2011
pstat_score works in 1.1.0.4? Okay. Will try tomorrow. Thanks.
Posts: 1,331
Threads: 44
Joined: Jun 2010
03 Oct 12, 12:59AM
(This post was last modified: 03 Oct 12, 01:32AM by Bukz.)
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
Posts: 756
Threads: 53
Joined: Nov 2011
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 :)