Fix cs_set_user_team issue on spectator
This commit is contained in:
parent
c1cf9d8e67
commit
db76fc7b66
|
@ -589,12 +589,21 @@ static cell AMX_NATIVE_CALL cs_set_user_team(AMX *amx, cell *params) // cs_set_u
|
||||||
WRITE_STRING(teaminfo);
|
WRITE_STRING(teaminfo);
|
||||||
MESSAGE_END();
|
MESSAGE_END();
|
||||||
|
|
||||||
if (params[2] == 1)
|
switch (params[2])
|
||||||
MF_SetPlayerTeamInfo(params[1], params[2], "TERRORIST");
|
{
|
||||||
else if (params[2] == 2)
|
case TEAM_T:
|
||||||
MF_SetPlayerTeamInfo(params[1], params[2], "CT");
|
MF_SetPlayerTeamInfo(params[1], params[2], "TERRORIST");
|
||||||
else
|
break;
|
||||||
MF_SetPlayerTeamInfo(params[1], params[2], NULL);
|
case TEAM_CT:
|
||||||
|
MF_SetPlayerTeamInfo(params[1], params[2], "CT");
|
||||||
|
break;
|
||||||
|
case TEAM_SPECTATOR:
|
||||||
|
MF_SetPlayerTeamInfo(params[1], params[2], "SPECTATOR");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
MF_SetPlayerTeamInfo(params[1], params[2], NULL);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user