When you are not sure about functions, check regamedll project, it's very useful:
https://github.com/s1lentq/ReGameDLL...ayer.cpp#L1631
Ignore any
#ifdef REGAMEDLL_ADD/
#ifndef REGAMEDLL_FIXES, this is not original valve code.
Now, look at function header, it looks like it doesn't take any argument. But since this function is a member of
CBasePlayer class, when you translate that to pawn it has one parameter: the player index. Any function related to entities will pass the entity index in pawn.
You have 2 solutions:
-hook
GiveDefaultItems as pre and block it, then redo the code so you can check if player is vip and give him a different weapon. Instead of
GiveNamedItem you can use
give_item
-hook
GiveNamedItem as pre, check if player is vip and use
OrpheuSetParam to change the weapon.
About having 2 vips at the same time, I think you did not test properly. Things will get buggy if you overwrite the offset.
__________________