AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Module Coding (https://forums.alliedmods.net/forumdisplay.php?f=9)
-   -   a question about module coding (https://forums.alliedmods.net/showthread.php?t=169342)

BB.O. 10-11-2011 08:50

a question about module coding
 
I want to coding a module, but I have a problem with that.

When I was using Orpheu:

OrpheuRegisterHook(OrpheuGetFunction("PM_Walk Move"), "PM_WalkMove")

how to hook PM_WalkMove when I am coding module?

Arkshine 10-11-2011 09:20

Re: a question about module coding
 
Look at Orpheu source code. Signature of the function + checking in memory.
You can look at Cvar Utilities too.

jim_yang 10-11-2011 09:44

Re: a question about module coding
 
I thought metamod hooked PM_Move by default

Arkshine 10-11-2011 09:48

Re: a question about module coding
 
PM_WalkMove is not PM_Move which is a member of DLL_FUNCTIONS.

jim_yang 10-11-2011 09:52

Re: a question about module coding
 
that's why I said "thought" :)

Arkshine 10-11-2011 10:00

Re: a question about module coding
 
Actually he could use PM_Move and you would not need signature or others but that's not the most efficient way because you would need to check many things before. If I'm right the most efficient way would be using your method, making a memory patch where it's called (PM_PlayerMove) to redirect to your function in the module ?

jim_yang 10-11-2011 10:02

Re: a question about module coding
 
maybe, I have never played with those frequently called functions.

BB.O. 10-11-2011 10:34

Re: a question about module coding
 
thanks all :D I will try it soon.

BB.O. 10-15-2011 08:01

Re: a question about module coding
 
Do you have any examples about hook PM_* functions?


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

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