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

Module: Okapi


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 02-09-2014 , 00:19   Re: Module: Okapi
Reply With Quote #7

Quote:
Originally Posted by joaquimandrade View Post
This step is incorrect

PHP Code:
okapi_set_ptr_int(RoundtimeMaxCheck32400//max check 0x94163 
That's because you are passing an offset, not the actual address you want.
You would do

PHP Code:
okapi_set_ptr_int(okapi_mod_get_offset_ptr(RoundtimeMaxCheck), 32400
To check if the signature is being searched correctly do:

PHP Code:
new offset okapi_mod_get_ptr_offset(okapi_mod_find_sig(SignA,8))
server_print("offset %x^n",offset
(Notice the name of this function is "the inverse" of the one used before)

After you patch the value by using a signature, remember that after map restart, the signature will be searched again, but now will not be found in the same memory location since it was altered. So be sure to check if the result from okapi_mod_find sig is not null, and be sure to confirm that your signature is unique.
Thanks for your info, now i can patch max roundtime. This is simple compare to Orpheu, just need 1 plugin, no extra files.

PHP Code:
#include <amxmodx>
#include <okapi>

//Offset from mp.dll build 4382 by IDA PRO. 
#define RoundtimeMaxCheck 0x94164
#define RoundtimeMaxCvarSet 0x9416D
#define RoundtimeMaxSet 0x94180

public plugin_init()
{
    
register_plugin("Okapi MaxRoundtime""0.0.1""wbyokomo")
    
    
okapi_set_ptr_int(okapi_mod_get_offset_ptr(RoundtimeMaxCheck), 32400)
    
okapi_set_ptr_int(okapi_mod_get_offset_ptr(RoundtimeMaxCvarSet), 540)
    
okapi_set_ptr_int(okapi_mod_get_offset_ptr(RoundtimeMaxSet), 32400)

__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
yokomo is offline
 



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 20:08.


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