Hello i have two method for spawn drone gun
PHP Code:
int dronegun = -1;
if((dronegun = CreateEntityByName("point_dz_dronegun")) != -1)
{
DispatchKeyValue(dronegun, "TeamNum", "2");
DispatchKeyValue(dronegun, "teamnumber", "2");
DispatchKeyValue(dronegun, "spawnAutomatically", "0");
SetEntPropEnt(dronegun, Prop_Send, "m_iTeamNum", CS_TEAM_CT);
SetEntProp(dronegun, Prop_Send, "m_iTeamNum", CS_TEAM_CT);
TeleportEntity(dronegun, end, NULL_VECTOR, NULL_VECTOR);
AcceptEntityInput(dronegun, "Spawn");
ActivateEntity(dronegun);
}
PHP Code:
int dronegun = -1;
if((dronegun = CreateEntityByName("dronegun")) != -1)//
{
DispatchKeyValue(dronegun, "TeamNum", "2");
DispatchKeyValue(dronegun, "teamnumber", "2");
DispatchKeyValue(dronegun, "spawnAutomatically", "0");
SetEntPropEnt(dronegun, Prop_Send, "m_iTeamNum", CS_TEAM_CT);
SetEntProp(dronegun, Prop_Send, "m_iTeamNum", CS_TEAM_CT);
DispatchSpawn(dronegun);
TeleportEntity(dronegun, end, NULL_VECTOR, NULL_VECTOR);
AcceptEntityInput(dronegun, "Spawn");
ActivateEntity(dronegun);
}
but dronegun still shooting on all teams