Thread: Module: Rage
View Single Post
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-07-2012 , 01:50   Re: Module: Rage
Reply With Quote #25

Quote:
Originally Posted by joaquimandrade View Post
One more example

Bonus question:
what does this do?
PHP Code:
RageHookReturn OnRestartRound(void*& multiplay,intret)
{
#ifdef __linux__
    
int offset 200;
#else
    
int offset 208;
#endif

    
intval = *(int*)(&(((char*)multiplay)[offset]));

    if(
val == 0)
        
val 1;

    return 
RageHookHandled;
}

void OnLoadFunction(FunctionForModule* function)
{
    if(!
strcmp(function->get_name(),"CHalfLifeMultiplay::RestartRound"))
    {
        function->
add_module_hook((void*)&OnRestartRound,RageHookPre);
    }

I think you check against wrong params count in rage_call.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline