danielkrupinski / Osiris

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

[HELP] Working stattrak in skinchanger #600

Closed igre3zy closed 4 years ago

igre3zy commented 5 years ago

Could someone guide me on how to make a working stattrak in the skin changer? It could be something as simple as (if the player gets a kill, add a kill to the stattrak number on the current weapon) thanks :)

RadicalRedemption commented 5 years ago

Can other players see your changed skin anyway?

JDeu commented 5 years ago

The best way I found to do this was to make a function in GameEvent hook and everytime you get a kill, get the current weapon you hold, plus 1 to a variable then at the end of the round open a json file and add the variable value to the weapon property. Then in the skinchanger when its applying the skin, read the json property and set the fallbackstattrack value to it.

VuBrian22 commented 5 years ago

Can other players see your changed skin anyway?

No they can't see your hanged skin because the skin changer only acts on the client-side of the game and not the server-side of things. All the other players see are the default skins of each weapon, including the knife.