What about if you are making an API of some sort? You change team in main plugin, but need to hook it on other. You could use forward ofcourse, but why if there is already an event?
Also, I would do something like this (untested):
PHP Code:
stock change_player_team(id, team)
{
static g_pMsgTeamInfo;
if(!g_pMsgTeamInfo)
g_pMsgTeamInfo = get_user_msgid("TeamInfo");
cs_set_user_team(id, CsTeams:team);
emessage_begin(MSG_BROADCAST, g_pMsgTeamInfo);
ewrite_byte(id);
switch(team)
{
case 0:ewrite_string("UNASSIGNED");
case 1:ewrite_string("TERRORIST");
case 2:ewrite_string("CT");
case 3:ewrite_string("SPECTATOR");
}
emessage_end();
}
__________________