View Single Post
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 11-07-2021 , 18:16   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #857

Quote:
Originally Posted by kadet.89 View Post
Dragokas, thanks, it works.

I have another question.
I read and then change int argument #5:
PHP Code:
            PrintToServer("Old value: %i"indexDHookGetParam(hParams5)); //"Old value: 38"
            
DHookSetParam(hParams542);
            
PrintToServer("New value: %i"indexDHookGetParam(hParams5)); //"New value: 38" 
Why does it show 38 after the value is changed?
The value is not changed until after the hook, so you can't use this method to retrieve a changed param.
__________________
Silvers is offline