I never used env_spritetrail but env_smokestack(you can do pretty much the same with them)
But keep in mind that this uses up a entity index(unlike temp ents).
Long trail:
public Action:Timer_GiveEffect( Handle:timer, any:client )
{
if(ValidPlayer(client, true))
{
new particle = CreateEntityByName("env_smokestack");
if(particle != -1)
{
decl String:Name[32], Float:fPos[3];
Format(Name, sizeof(Name), "W3S_Trail#%i", client);
GetEntPropVector(client, Prop_Send, "m_vecOrigin", fPos);
fPos[2] += 20.0;
DispatchKeyValueVector(particle, "Origin", fPos);
DispatchKeyValueFloat(particle, "BaseSpread", 0.5);
DispatchKeyValueFloat(particle, "StartSize", 5.0);
DispatchKeyValueFloat(particle, "EndSize", 5.0);
DispatchKeyValueFloat(particle, "Twist", 0.0);
DispatchKeyValue(particle, "Name", Name);
DispatchKeyValue(particle, "SmokeMaterial", "particle/fire.vmt");
if(GetClientTeam(client)==3) {
DispatchKeyValue(particle, "RenderColor", "100 100 255");
} else {
DispatchKeyValue(particle, "RenderColor", "230 100 100");
}
DispatchKeyValue(particle, "SpreadSpeed", "0");
DispatchKeyValue(particle, "RenderAmt", "100");
DispatchKeyValue(particle, "JetLength", "1");
DispatchKeyValue(particle, "RenderMode", "0");
DispatchKeyValue(particle, "Initial", "0");
DispatchKeyValue(particle, "Speed", "1");
DispatchKeyValue(particle, "Rate", "100");
DispatchSpawn(particle);
SetVariantString("!activator");
AcceptEntityInput(particle, "SetParent", client, particle, 0);
AcceptEntityInput(particle, "TurnOn");
iTrailEntity[client] = particle;
}
}
}
public OnWar3EventSpawn(client)
{
// RequestFrame should work too.. (this code is old :)
CreateTimer(1.0, Timer_GiveEffect, client);
}
public OnWar3EventDeath(victim,attacker)
{
new ent = iTrailEntity[victim];
if(IsValidEntity(ent))
{
AcceptEntityInput(ent, "Kill");
}
}