csgo-cheat-base icon indicating copy to clipboard operation
csgo-cheat-base copied to clipboard

material->create_material not present.

Open Alluseri opened this issue 3 years ago • 1 comments

I can't create materials using the material interface, and I consider doing that by creating them in the game folder unsafe. Is there a possibility to add this function?

Alluseri avatar Jul 19 '21 20:07 Alluseri

Hello Alluseri, you should be able to add create_material by just adding the following code in your i_material_system class:

i_material* create_material(char const * material_name, c_key_values * key_values) {
	using fn = i_material * ( __thiscall * )( i_material_system *, char const *, c_key_values * );
	return ( *( fn ** ) this )[ 83 ]( this, material_name, key_values);
}

the rest should be pretty self-explanatory

Milkmen avatar Jul 25 '21 05:07 Milkmen