Raised This Month: $51 Target: $400
 12% 

a question about module coding


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BB.O.
Member
Join Date: Feb 2011
Old 10-11-2011 , 08:50   a question about module coding
Reply With Quote #1

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?
BB.O. is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-11-2011 , 09:20   Re: a question about module coding
Reply With Quote #2

Look at Orpheu source code. Signature of the function + checking in memory.
You can look at Cvar Utilities too.
__________________
Arkshine is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 10-11-2011 , 09:44   Re: a question about module coding
Reply With Quote #3

I thought metamod hooked PM_Move by default
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-11-2011 , 09:48   Re: a question about module coding
Reply With Quote #4

PM_WalkMove is not PM_Move which is a member of DLL_FUNCTIONS.
__________________
Arkshine is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 10-11-2011 , 09:52   Re: a question about module coding
Reply With Quote #5

that's why I said "thought"
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-11-2011 , 10:00   Re: a question about module coding
Reply With Quote #6

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 ?
__________________
Arkshine is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 10-11-2011 , 10:02   Re: a question about module coding
Reply With Quote #7

maybe, I have never played with those frequently called functions.
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
BB.O.
Member
Join Date: Feb 2011
Old 10-11-2011 , 10:34   Re: a question about module coding
Reply With Quote #8

thanks all I will try it soon.
BB.O. is offline
BB.O.
Member
Join Date: Feb 2011
Old 10-15-2011 , 08:01   Re: a question about module coding
Reply With Quote #9

Do you have any examples about hook PM_* functions?
BB.O. is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:53.


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