Quote:
|
Originally Posted by .Owyn.
looks like working but server still sends correct information about player team =\
|
If you want this for CS, you should instead send a TeamInfo message like this:
Code:
message_begin( MSG_BROADCAST, get_user_msgid("TeamInfo") )
write_byte( 5 ) // player index
write_string( "CT" ) // team: "UNASSIGNED", "TERRORIST", "CT", or "SPECTATOR"
message_end( )
Note that the actual player's team will not be changed. For that you have to set the corresponding offset (
set_pdata_int( id, 114, team ) ).
Also, you can use the destination MSG_ALL if you want the team message to be reliable (i.e.
always arrive to clients). Be careful about sending too many reliable messages at once though: you can easily overflow clients or even crash the server!
__________________