I trying to create instant sentry on point with instant level 2 or 3, with instant "PercentageConstructed", but its still has upgrade animation which during 1-2 seconds...
How to make it instant, that you created sentry(not engineer, via code) and it will ready to fight intantly, not after 2 seconds...?
PHP Code:
...
int sentry = CreateEntityByName("obj_sentrygun");
if(!IsValidEntity(sentry)) return 0;
int iTeam = GetClientTeam(builder);
DispatchKeyValueVector(sentry, "origin", Position);
DispatchKeyValueVector(sentry, "angles", Angle);
SetEntProp(sentry, Prop_Send, "m_iUpgradeLevel", level);
SetEntProp(sentry, Prop_Send, "m_iHighestUpgradeLevel", level);
SetEntProp(sentry, Prop_Send, "m_iUpgradeLevel", level);
SetEntProp(sentry, Prop_Data, "m_spawnflags", flags);
SetEntProp(sentry, Prop_Send, "m_bBuilding", 1);
SetEntProp(sentry, Prop_Send, "m_nSkin", iTeam -2);
SetEntProp(sentry, Prop_Send, "m_iAmmoShells", 999);
if(GetEntProp(sentry, Prop_Send, "m_iUpgradeLevel") == 3)
SetEntProp(sentry, Prop_Send, "m_iAmmoRockets", 200);
SetEntProp(sentry, Prop_Send, "m_iState", 1);
DispatchSpawn(sentry);
SetVariantInt(iTeam);
AcceptEntityInput(sentry, "SetTeam");
ActivateEntity(sentry);
SetEntPropEnt(sentry, Prop_Send, "m_hBuilder", builder);
SetEntPropFloat(sentry, Prop_Send, "m_flPercentageConstructed", 1.0);
...