Getting Player Team in CS
#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:


Messages In This Thread
Getting Player Team in CS - by Felix-The-Ghost - 02 Oct 12, 02:16AM
RE: Getting Player Team in CS - by Bukz - 03 Oct 12, 12:59AM