Well i have coded an skinchanger and it works now but i want to create a knife changer and i have little to no info about it!

as i know the model index changes and i think its your current index + 72 for CT (karambit)

If anyone could tell me how to approach this i would be thankful!

This is what i have (it crashes the game)
Code:
bool applyKnife(DWORD weapon, int id) {

	int model = Mem->Read<int>(weapon + m_ModelIndex) + 72;

	if (id == 59 || id == 42) {
		Mem->Write<float>(weapon + m_iItemDefinitionIndex, WEAPON_KNIFE_KARAMBIT);
		Mem->Write<int>(weapon + m_ModelIndex, model);
		Mem->Write<int>(weapon + m_iWorldModelIndex, 330);
		Mem->Write<int>(weapon + m_hViewModelIndex, 329);
		Mem->Write<int>(weapon + m_iItemIDHigh, -1);
		Mem->Write<int>(weapon + m_nFallbackStatTrak, -1);
		Mem->Write<int>(weapon + m_nFallbackPaintKit, 569);
		Mem->Write<float>(weapon + m_flFallbackWear, 0.0001f);
	}

	

	return true;
}