TF2_SetPlayerClass

Last Updated2014-11-15
Created At2008-04-04

Sets a client's class. Note: If setting player class in a player spawn hook weapons should be set to false.

stock void TF2_SetPlayerClass(int client, TFClassType classType, bool weapons = true, bool persistent = true)

Parameters

int client
Player's index.
TFClassType classType
TFClassType class symbol.
bool weapons
This parameter is ignored.
bool persistent
If true, changes the player's desired class so the change stays after death.

Return Value

void

Error

Invalid client index.