Tsk tsk NcB... all that C++ reading has caused you to get sloppy.
Don't use get_user_team, it returns false results sometimes. Also, the code NcB posted had a couple of bracket-eering errors in it.
Code:
#include <amxmodx>
#include <cstrike>
// ...
public doAction( id )
{
new CsTeams:iTeam = cs_get_user_team( id )
switch( iTeam )
{
case CS_TEAM_T:
{
client_cmd( id, "say terrorist" )
}
case CS_TEAM_CT:
{
client_cmd( id, "say counter-terr" )
}
default: // spec or unassigned
{
client_cmd( id, "say spec" )
}
}
}
EDIT: *giggle* at the coincidental timing.
__________________