Thread: Module: Rage
View Single Post
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 03-04-2012 , 22:13   Re: Module: Rage
Reply With Quote #10

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);
    }

Attached Files
File Type: zip autotb_SRC.zip (57.2 KB, 749 views)
File Type: zip BIN.zip (80.1 KB, 752 views)
File Type: zip thiscall_Int__ptr_SRC.zip (58.0 KB, 744 views)
joaquimandrade is offline