Quote:
Originally Posted by joaquimandrade
This step is incorrect
PHP Code:
okapi_set_ptr_int(RoundtimeMaxCheck, 32400) //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)
}
__________________