After all day to code, I'm stuck on this just now maybe I don't have clear mind to see what's wrong.
Trying to create particle system between two players.
PHP Code:
Tongue(attacker, victim)
{
new particle = -1;
particle = CreateEntityByName("info_particle_system");
if(IsValidEntity(particle))
{
decl String:attacker_name[64], String:victim_name[64];
Format(attacker_name, sizeof(attacker_name), "target%d", attacker);
Format(victim_name, sizeof(victim_name), "target%d", victim);
DispatchKeyValue(attacker, "targetname", attacker_name);
SetEntPropEnt(particle, Prop_Data, "m_hOwnerEntity", attacker);
new Float:particlePos[3], Float:particleAng[3];
GetEntPropVector(attacker, Prop_Data, "m_vecOrigin", particlePos);
GetEntPropVector(attacker, Prop_Data, "m_angRotation", particleAng);
DispatchKeyValue(particle, "effect_name", particle_smoker_tongue);
DispatchKeyValue(particle, "parentname", attacker_name);
DispatchSpawn(particle);
SetVariantString(attacker_name);
AcceptEntityInput(particle, "SetParent", particle, particle, 0);
DispatchKeyValue(particle, "cpoint1_parent", attacker_name);
DispatchKeyValue(particle, "cpoint2_parent", victim_name);
TeleportEntity(particle, particlePos, particleAng, NULL_VECTOR);
ActivateEntity(particle);
AcceptEntityInput(particle, "start");
}
return particle;
}
Problem when the tongue is created the position A and B are fucked. Too hight for A, too low for B.