danielkrupinski / Osiris

Cross-platform game hack for Counter-Strike 2 with Panorama-based GUI.
MIT License
3.35k stars 960 forks source link

Get current paintkit name #2416

Closed caiocinel closed 3 years ago

caiocinel commented 3 years ago

Hello, I would like to know some way to get the raw name of the skin equipped in SkinChanger because the only way I found is in initializeKits and it is still very poorly done and nothing optimized.

Ty

danielkrupinski commented 3 years ago

What do you mean by "raw name"?

caiocinel commented 3 years ago

I need to get the Paint Kit class for the skin I selected in the ListBox (to get the buffer), I've tested it with vector_index and paintkit, but they all return incorrect data.

image

const auto paintKit = itemSchema->paintKits.memory[currentSkin].value; auto name = paintKit->itemName.data();

This results in incorrect names, it is probably not the paint kit I should use as a reference:

image

caiocinel commented 3 years ago

After some time I did the most intelligent thing, which is to define together when the skins are initialized.

image

Btw, ty