designer1337 / csgo-cheat-base

simple csgo internal base.
MIT License
245 stars 50 forks source link

material->create_material not present. #110

Open Alluseri opened 3 years ago

Alluseri commented 3 years ago

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?

Milkmen commented 3 years ago

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