View Single Post
DarthMan
Veteran Member
Join Date: Aug 2011
Old 05-07-2019 , 09:44   Re: [H3LP] Hooking CBasePlayer::StartObserver
Reply With Quote #4

Quote:
Originally Posted by HamletEagle View Post
okapi_build_function should be used for functions without a class.
okapi_build_method should be used for functions that are member of a class.

orpheu can hook Vector&(IIRC), but not Vector. Okapi can do both. Just take care with okapi, under linux it could crash the server due to some memory bug which wasn't fixed yet.
Ah, I see. Thanks for letting me know.
Also, I noticed a bug with Okapi.
If I do new hObserverValue = wl(okapi_mod_find_sig(hObserverSignature, sizeof hObserverSignature), okapi_mod_get_symbol_ptr(szObserverSymbol)); all works fine, but if I hook the same function in another plug-in, then it gives me an error. [OKAPI] Null address provided
Same thing happens if I register hObserverValue twice in the plug-in using it, I did that just for testing purposes to see if it causes the error. That means that you can only register a hook once, so, like, it can only be registered in 1 plug-in. Registering it in multiple plug-ins will cause that error. I don't know if that's due to a problem on Okapi itself, but, most likely, it's that. I remember Arkshine saying that he stopped working on Rage/Orpheu/Okapi and he probably won't be touching them anytime in the enar future, since he's focused more on AMX Mod X rather than additional modules right now. And also, considering how slowly AMXX is advancing and 1.9 is still not a stable build, could take a year or a few more before 1.8.2 is finally replaced by 1.9 . Not to mention that there's also AMXX v1.10 available now and I've upgraded to it recently.
DarthMan is offline