Feel silly asking this because I have run into this problem before a long time ago and managed to fix it. However, I have already wasted 2 hours on it, so I hope someone has an idea.
I am spawning flags, but they are not accepting collisions. I am hooking them with Touch, but its not being called since collisions arent working. I have checked out some old threads on here and found...
http://forums.alliedmods.net/showthr...t=prop_dynamic
but still not having much luck. Also, the model is precached on the server as well.
Code:
CreateFlag(const String:model[], const String:targetName[], Float:pos[3])
{
new flag = CreateEntityByName("prop_dynamic_override");
if(IsValidEdict(flag))
{
//DispatchKeyValue(flag, "model", model);
SetEntityModel(flag, model);
DispatchKeyValue(flag, "DefaultAnim", "flag_idle1");
DispatchKeyValue(flag, "targetname", targetName);
DispatchKeyValue(flag, "StartDisabled", "false");
DispatchKeyValue(flag, "Solid", "6");
SetEntProp(flag, Prop_Data, "m_CollisionGroup", 5);
SetEntProp(flag, Prop_Data, "m_usSolidFlags", 16);
SetEntProp(flag, Prop_Data, "m_nSolidType", 6);
DispatchSpawn(flag);
AcceptEntityInput(flag, "Enable");
AcceptEntityInput(flag, "TurnOn");
AcceptEntityInput(flag, "DisableMotion");
TeleportEntity(flag, pos, NULL_VECTOR, NULL_VECTOR);
}
return flag;
}