AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Orpheu] CSoundEnt::SoundPointerForIndex (https://forums.alliedmods.net/showthread.php?t=271340)

teh ORiON 09-10-2015 12:44

[Orpheu] CSoundEnt::SoundPointerForIndex
 
Hi,

I'm trying to hook this function:

SoundPointerForIndex


And here's the signature for it:

Signature


The signature is found and argument/return validates just fine.
However when I register a hook for the function it crashes on mapload and I'm not quite sure why, as the signature should be solid.

For search in IDA "8B ? ? ? ? ? 85 ? 75 ? 33 ? C3 8B ? ? ? 83 ? ? 7E ? 68 ? ? ? ? 6A ?"

Arkshine 09-10-2015 15:15

Re: [Orpheu] CSoundEnt::SoundPointerForIndex
 
Function is static so you should hook it like a no-class function.

teh ORiON 09-11-2015 05:42

Re: [Orpheu] CSoundEnt::SoundPointerForIndex
 
I tried, same story, crashes on load, unless Im doing something wrong:

Sig


Pawn

Arkshine 09-11-2015 14:26

Re: [Orpheu] CSoundEnt::SoundPointerForIndex
 
Replace "CSound *" by "pointer", the former is not a class associated to an entity.

Signature works for cstrike as well, and you can cut after 0x83.

teh ORiON 09-11-2015 16:55

Re: [Orpheu] CSoundEnt::SoundPointerForIndex
 
Thanks a bunch, works well!


All times are GMT -4. The time now is 22:16.

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