-
-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add these hooks #286
Comments
Better yet, it wouldn't be possible, or it would be up to the plugin developer to create a gamedata file for the plugin and simply run it, something like SourceMod, for example, PTaH and others. This way we are not stuck editing the CSSharp gamedata file, even updating it does not generate errors in plugins and such. @Whaliin sorry for the ping, just to get your opinion. |
it was implemented in #194 |
Perfect, now it's with the author of Weapon Restrict so, thanks! |
More hooks should be natively supported by CounterStrikeSharp, but this creates problems with maintainability (updating offsets for example) so I understand why that might not be the case. CanAcquire is minimally useful but GetCSWeaponDataFromKey is more useful. Of course these would need to be documented as well, if added. Instead, perhaps it could be documented #194 exists, for example in "Examples" section of the docs. I was not even aware such a method existed until I was pinged with it. |
Is the GetCSWeaponDataFromKey signature current? I'm having trouble finding on Windows with IDA |
Hello @roflmuffin
Whalin made a weapon restrict plugin for cssharp: https://github.com/CS2Plugins/WeaponRestrict
But if we wanna use this plugin, we have to add these lines to the gamedata file:
"CCSPlayer_CanAcquire": {
"signatures": {
"library": "server",
"windows": "\x48\x8B\xC4\x44\x89\x40\x18\x48\x89\x48\x08\x55\x56",
"linux": "\x55\x48\x89\xE5\x41\x57\x41\x56\x48\x8D\x45\xCC"
}
},
"GetCSWeaponDataFromKey": {
"signatures": {
"library": "server",
"windows": "\x48\x89\x5C\x24\xCC\x48\x89\x74\x24\xCC\x57\x48\x83\xEC\x20\x48\x8B\xFA\x8B",
"linux": "\x55\x48\x89\xE5\x41\x57\x41\x56\x41\x89\xFE\x41\x55\x41\x54\x45"
}
}
So after every cssharp update, we'll have to edit gamedata file too. Can you add these to the cssharp gamedata file by default?
The text was updated successfully, but these errors were encountered: