native

rg_set_user_team

Syntax

native rg_set_user_team(const index, {TeamName,_}:team, {ModelName,_}:model = MODEL_AUTO, const bool:send_teaminfo = true, const bool:check_win_conditions = false);

Description

Sets the client's team without killing the player and sets the client's model.

Parameters

index Client index
team Team id
model Internal model, use MODEL_AUTO for a random appearance or MODEL_UNASSIGNED to not update it
send_teaminfo If true, a TeamInfo message will be sent
check_win_conditions If true, a CheckWinConditions will be call

Note

To obtain a TeamName use the following:
new TeamName:team = get_member(id, m_iTeam);

Return

1 on success, 0 otherwise