Hello!
I tried to make a skinchanger, however it doesn't apply the skins. If you could help me that would be great! Code:
void visuals::skinchanger(c_usercmd* cmd){
if (!variables::skinchanger::bSkinchanger)
return;
const auto& weapon = csgo::local_player->active_weapon();
if (!weapon)
return;
if (const auto paint = variables::skinchanger::skins[weapon->item_definition_index()])
{
const bool shouldUpdate = weapon->fall_back_kit() != paint;
if (shouldUpdate)
{
weapon->item_id_high() = -1;
weapon->fall_back_kit() = paint;
weapon->fall_back_wear() = 0.01f;
interfaces::clientstate->full_update();
}
}
}
The fall_back_kit, item_id_high, and fall_back_wear were added by me to "weapon_t":
NETVAR("DT_BaseAttributableItem", "m_iItemIDHigh", item_id_high, int);
NETVAR("DT_BaseCombatWeapon", "m_nFallbackPaintKit", fall_back_kit, int);
NETVAR("DT_BaseCombatWeapon", "m_flFallbackWear", fall_back_wear, float);
"skins" variable is a std::map<int, int> that stores the weapon id as a key.
Hello! I tried to make a skinchanger, however it doesn't apply the skins. If you could help me that would be great! Code:
void visuals::skinchanger(c_usercmd* cmd){ if (!variables::skinchanger::bSkinchanger) return;
}
The fall_back_kit, item_id_high, and fall_back_wear were added by me to "weapon_t": NETVAR("DT_BaseAttributableItem", "m_iItemIDHigh", item_id_high, int); NETVAR("DT_BaseCombatWeapon", "m_nFallbackPaintKit", fall_back_kit, int); NETVAR("DT_BaseCombatWeapon", "m_flFallbackWear", fall_back_wear, float);
"skins" variable is a std::map<int, int> that stores the weapon id as a key.