PHP Code:
new szname[32]
get_user_name(id,szname,31)
if(equal(szname,name)) // is the gotten user name the same as the 'name' variable that you posted
switch(cs_get_user_team(id))
{
case CS_TEAM_T: cs_set_user_model(id, "test.mdl")
case CS_TEAM_CT:cs_set_user_model(id, "test2.mdl")
default:cs_reset_user_model(id)
}