View Single Post
Liam
SourceMod Developer
Join Date: Jan 2008
Location: Atlanta, GA
Old 07-10-2008 , 19:50   Re: [TF2] Super Builds ( Stronger Buildables with more ammo )
Reply With Quote #10

Teddy,

Code:
 
for (new i=1;i <= MaxEntities; i++)
{
if (IsValidEntity(i))
{
GetEntityNetClass(i, String:strClassName, 64)
if (strcmp(String:strClassName, "CObjectSentrygun", true) == 0 || strcmp(String:strClassName, "CObjectDispenser", true) == 0 ||strcmp(String:strClassName, "CObjectTeleporter", true) 
== 0)
{
//Change the ojbects's health
SetEntData( i , FindSendPropOffs("CObjectSentrygun","m_iMaxHealth") , GetConVarInt(Cvar_MaxHealth), 4, true );
SetEntData( i , FindSendPropOffs("CObjectSentrygun","m_iHealth") , GetConVarInt(Cvar_MinHealth), 4, true );
SetEntData( i , FindSendPropOffs("CObjectSentrygun","m_iAmmoShells") , GetConVarInt(Cvar_AmmoShells), 4, true );
//SetEntData( i , FindSendPropOffs("CObjectSentrygun","m_iAmmoRockets") , GetConVarInt(Cvar_AmmoRockets), 4, true );
 
}
}
}
The loop your using there doesn't set the other items. Your finding them, but then your only setting CObjectSentrygun?
Liam is offline