My whining:
After a long time searching finally I realized there is no implemented API for "Switch player weapon".
SDKHook only provide hooks for "SDKHook_WeaponSwitch", but no function call.
I am so confused about that because I think this is very useful(maybe?), current for me.
So I decided to find it.
First, we need to find "CBaseCombatCharacter::Weapon_Equip",
it's easy to get it because of
unique string
"%s equipped with %s, proficiency is %s".
Then, compare it with the same function in "server_srv.so",
we can locate a function "CBaseCombatCharacter::SetActiveWeapon" (believe you can do this
),
open it, and
check its xrefs by press "X" at IDA,
finally you could see 5 calls,
one of them is "CBaseCombatCharacter::Weapon_Switch",
one by one to analyze it though "server_srv.so" and "server.dll", you could figure it out.
The last step is the hardest step so it needs patience.
And using "Pseudocode" window in IDA(Press Tab) can do a lot of help.
__________________