I tried using
SetEntPropString(entity, Prop_Data, "m_iszModel", giftModel); but it said that m_iszModel don't exist.
Then i tried this:
Code:
public void OnEntityCreated(int entity, const char[] classname)
{
if(GetConVarBool(cvarHp)) if(StrContains(classname, "item_healthkit") != -1) SDKHook(entity, SDKHook_SpawnPost, HealthKit_Change);
if(GetConVarBool(cvarMetal)) if(StrContains(classname, "item_ammopack") != -1 || StrEqual(classname, "tf_ammo_pack")) SDKHook(entity, SDKHook_SpawnPost, AmmoPack_Change);
}
public void HealthKit_Change(int entity)
{
if(IsValidEntity(entity)) DispatchKeyValue(entity, "powerup_model", giftFest);
}
public void AmmoPack_Change(int entity)
{
if(IsValidEntity(entity)) DispatchKeyValue(entity, "powerup_model", giftModel);
}
but it just does nothing.