This is what I use.
PHP Code:
public OnPluginStart()
{
RegConsoleCmd("sm_milkme", Command_Milk)
}
public Action:Command_Milk(client, args)
{
if (IsClientInGame(client) && IsPlayerAlive(client))
{
TF2_AddCondition(client, TFCond:27, float(float(1)));
}
return Plugin_Handled;
}
Note the duration is set to 1.0 second. Actually, this is a trick to make the effect last indefinitely. I don't understand why, but when you cast a float as a float, at least with my sourcemod setup (I might be using an old sdk), it makes it last forever. If it only lasts for a second for you, just change the "float(float(1))" to something like "9000.1"