View Single Post
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 09-10-2017 , 05:00   Re: Module: Orpheu (v2.6.3)
Reply With Quote #1487

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.
__________________

Last edited by HamletEagle; 09-10-2017 at 05:13.
HamletEagle is offline