plugins/include/tf2_stocks.inc
changeset 1988 0eae92e7cfd2
parent 1987 0534b0a2ffda
child 2005 92033efef85f
     1.1 --- a/plugins/include/tf2_stocks.inc	Thu Apr 10 19:28:26 2008 +0000
     1.2 +++ b/plugins/include/tf2_stocks.inc	Fri Apr 11 07:58:06 2008 +0000
     1.3 @@ -98,6 +98,8 @@
     1.4  /**
     1.5   * Set's a Clients class.
     1.6   *
     1.7 + * Note: If setting player class in a player spawn hook weapons should be set to false.
     1.8 + *
     1.9   * @param client		Player's index.
    1.10   * @param class			TFClassType class symbol.
    1.11   * @param weapons		If true, changes the players weapon set to that of the new class.
    1.12 @@ -110,7 +112,7 @@
    1.13  	SetEntProp(client, Prop_Send, "m_iDesiredPlayerClass", _:class);
    1.14  	TF2_SetPlayerResourceData(client, TFResource_PlayerClass, class);
    1.15  	
    1.16 -	if (weapons)
    1.17 +	if (weapons && IsPlayerAlive(client))
    1.18  	{
    1.19  		TF2_RemoveAllWeapons(client);
    1.20  		TF2_EquipPlayerClassWeapons(client, class);