Quote:
Originally Posted by nosoop
Hook the player_spawn event to find out when the player spawns, then use TF2_AddCondition() to apply the effect.
If you want players to configure which condition they spawn with, then you probably want to create some sort of command like sm_spawncond, parse their desired condition, and store it in a plugin-scoped array:
Code:
TFCond g_DesiredConditions[MAXPLAYERS+1];
|
Oh thanks, i just did it like this but i'm not really sure because it gave me a tag mismatch on that line.
PHP Code:
public void event_PlayerSpawn(Handle event, const char[] name, bool dontBroadcast)
{
int client = GetClientOfUserId(GetEventInt(event, "userid"));
int iCondition;
SetEntProp(client, Prop_Send, "m_nPlayerCond", g_DesiredConditions[client]);
g_DesiredConditions[client] = iCondition;
}
oh and i also hooked the event inside the spawncond command.
__________________