AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Orpheu] Hooking funcs from AMXX modules (https://forums.alliedmods.net/showthread.php?t=190051)

Misery 07-14-2012 08:11

[Orpheu] Hooking funcs from AMXX modules
 
Hi,

I would like very much to hook cs_set_user_team() from cstrike.dll/.so...
Is that even possible to do it with Orpheu?!?

Thanks!

Misery

SpeeDeeR 07-14-2012 08:59

Re: [Orpheu] Hooking funcs from AMXX modules
 
Define your purpose.

Aooka 07-14-2012 09:01

Re: [Orpheu] Hooking funcs from AMXX modules
 
Yes we do not really understand what you want exactly ... ( In any case I do not understand )

ConnorMcLeod 07-14-2012 09:42

Re: [Orpheu] Hooking funcs from AMXX modules
 
What he is asking is clear enough.
I'm not sure if you can add libraries to orpheu as rage allow it, you would need a sig though.

Misery 07-14-2012 10:05

Re: [Orpheu] Hooking funcs from AMXX modules
 
Yes, of course I'd have a sig.
Still, can I really put into Orpheu something like
Code:

[bla bla bla]
library : "cstrike_amxx"
[bla bla bla]

EDIT: Not cstrike.dll sorry... I meant cstrike_amxx.dll

As for the purpose, it's to track team changes made by plugins using cs_set_user_team() since it cannot be hooked into AMXX... I was hooking pfnMessageX functions to get the TeamInfo sent by cs_set_user_team(), but the problem is that ColorChat's TeamInfos (which are not interceptable by the standard register_event(), but are intercepted by the pfnMessage hooks) completely corrupt my team cache and other caches I maintain derived from this message (since ColorChat sometimes send erroneous TeamInfos to switch colors).

I need to cache team data... don't even try to find another possible solution, I've already thought about all that and the design is well thought. I have too much team calculations around. What I mean by caching here is just storing it in an g_iTeams[33] and such.

So I thought I could, instead of hooking pfnMessageX functions (which corrupt as said my caches with wrong data), use the standard register_event() and simply hook the special case cs_set_user_team()... that way it'd work...

Thanks!

ConnorMcLeod 07-14-2012 12:36

Re: [Orpheu] Hooking funcs from AMXX modules
 
You could also try to hook amxx receiving MF_SetPlayerTeamInfo (sent at least from cs_set_user_team).


All times are GMT -4. The time now is 15:17.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.