Raised This Month: $ Target: $400
 0% 

Module: Okapi


Post New Thread Reply   
 
Thread Tools Display Modes
bibu
Veteran Member
Join Date: Sep 2010
Old 07-05-2017 , 15:00   Re: Module: Okapi
Reply With Quote #121

I wonder if there is a native equivalent as this on Orpheu:

Quote:
#define set_mp_pdata(%1,%2) ( OrpheuMemorySetAtAddress( g_pGameRules, %1, 1, %2 ) )
#define get_mp_pdata(%1) ( OrpheuMemoryGetAtAddress( g_pGameRules, %1 ) )
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-05-2017 , 16:02   Re: Module: Okapi
Reply With Quote #122

It is.
__________________
HamletEagle is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-08-2018 , 08:04   Re: Module: Okapi
Reply With Quote #123

Quote:
Originally Posted by KORD_12.7 View Post
Is Okapi still alive? Any updates?
x3

Would be good to have at least the bug fixed. Or add Vector support to Orpheu
__________________

Last edited by HamletEagle; 07-08-2018 at 08:05.
HamletEagle is offline
KORD_12.7
Senior Member
Join Date: Aug 2009
Location: Russia, Vladivostok
Old 07-19-2018 , 09:10   Re: Module: Okapi
Reply With Quote #124

Quote:
Originally Posted by HamletEagle View Post
x3

Would be good to have at least the bug fixed. Or add Vector support to Orpheu
I see... Still dead. Lol.
__________________

Vi Veri Veniversum Vivus Vici
Russian Half-Life and Adrenaline Gamer community
KORD_12.7 is offline
Send a message via ICQ to KORD_12.7
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-19-2018 , 09:12   Re: Module: Okapi
Reply With Quote #125

I see, still alive, you Russian! Lol.

Feel free to hire me so I can focus on it.
__________________

Last edited by Arkshine; 07-19-2018 at 09:13.
Arkshine is offline
KORD_12.7
Senior Member
Join Date: Aug 2009
Location: Russia, Vladivostok
Old 07-19-2018 , 09:14   Re: Module: Okapi
Reply With Quote #126

Arkshine

Working on : CS Weapon Mod (72%) , MonsterAI (PAUSED), - old good Arkshine.
__________________

Vi Veri Veniversum Vivus Vici
Russian Half-Life and Adrenaline Gamer community

Last edited by KORD_12.7; 07-19-2018 at 09:16.
KORD_12.7 is offline
Send a message via ICQ to KORD_12.7
loiraolhosazul
Member
Join Date: May 2020
Old 03-06-2021 , 22:05   Re: Module: Okapi
Reply With Quote #127

works with rehlds ?
loiraolhosazul is offline
TheVaskov
Member
Join Date: Sep 2021
Location: Russia
Old 05-03-2023 , 04:44   Re: Module: Okapi
Reply With Quote #128

1. Open DOD.dll with Ghidra
2. Find FuncName
3. Read'n'learn arguments
4. Create function
5. Test

Day of Defeat 1.3
Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>
#include <fakemeta_util>
#include <dodx>
#include <dodfun>
#include <fun>
#include <engine>
#include <okapi>

new okapi_func:func_RocketTouch
new okapi_func:func_RocketExplodeTouch
new okapi_func:func_ThinkZoomOutIn_CBasePlayerWeapon
new okapi_func:func_ThinkZoomOutIn_CScopedKar

public plugin_init()
{
    register_plugin("DOD OKAPI TEST", "2023", "America")

    /*
    okapi_mod_replace_string("sprites/obj_icons/icon_obj_axis.spr","sprites/obj_icons/icon_obj_axiz.spr",1)
    okapi_engine_replace_string("sprites/obj_icons/icon_obj_axis.spr","sprites/obj_icons/icon_obj_axiz.spr",1)

    okapi_mod_replace_string("sprites/obj_icons/icon_obj_axis.spr","sprites/obj_icons/icon_obj_axiz.spr",1)
    okapi_engine_replace_string("sprites/obj_icons/icon_obj_axis.spr","sprites/obj_icons/icon_obj_axiz.spr",1)

    */
    register_event("SetFOV","Set_fov_post","be","1>0") // проверить перезапись угла

    server_print("OKAPI RUNS")
}


public On_func_RocketTouch(idx_shell, idx_ent)
{
    //new obj = okapi_get_orig_return()

    server_print("On_func_RocketTouch %d %d", idx_shell, idx_ent)

    new sz_classname[32]
    pev( idx_shell, pev_classname, sz_classname, 31)
    server_print(sz_classname)
    pev( idx_ent, pev_classname, sz_classname, 31)
    server_print(sz_classname)
    return okapi_ret_ignore
    // return okapi_ret_supercede // blocking run RocketExplodeTouch
}

public On_func_RocketExplodeTouch(idx_shell, idx_ent)
{
    server_print("On_func_RocketExplodeTouch %d %d", idx_shell, idx_ent)
    return okapi_ret_ignore
}

public On_func_ThinkZoomOutIn(idx_weapon)
{   
    server_print("On_")
    return okapi_ret_supercede
}

public plugin_precache()
{   
    // REGISTERING ROCKETLAUCNH FUNCTION
    // Находим идентификатор функции
    new func_RocketTouch_ptr = okapi_mod_get_symbol_ptr("?RocketTouch@CBazookaShell@@QAEXPAVCBaseEntity@@@Z") 
    if(!func_RocketTouch_ptr)
    {   
        // Если на найдено , тогда ищем по сигнатуре
        // install_gamerules_ptr = okapi_get_treemap_ptr("[TG.;nC'.pbG.sXQ.J=g(.;OS'.ueA.1/.*K}.`/F'. 8u{.s9s{.Ohi(.,lm{.s9s{.2/#&.*0J.lE>'.1`}&.-]}&.vMa(.zp='.<cN'.=j12")
        server_print("OKAPI func_RocketTouch_ptr error")
    }
    // Раз уж найдено, создаём метод, т.к. функция принадлежит какому-то классу, если бы это была безклассовая функция, то использовали бы okapi_build_function
    // описываем функцию, является ли возвратом , какие аргументы даёт.   
    func_RocketTouch = okapi_build_method(func_RocketTouch_ptr, arg_void, arg_cbase, arg_cbase)
    // cоздаём хук для вызова On_func_RocketTouch при обнаружениии  ?RocketTouch@CBazookaShell@@QAEXPAVCBaseEntity@@@Z
    okapi_add_hook(func_RocketTouch,"On_func_RocketTouch", 0) // 1 = post
    

    new func_RocketExplodeTouch_ptr = okapi_mod_get_symbol_ptr("?RocketExplodeTouch@CGrenade@@QAEXPAVCBaseEntity@@@Z") 
    if(!func_RocketExplodeTouch_ptr)
    {   

    //install_gamerules_ptr = okapi_get_treemap_ptr("[TG.;nC'.pbG.sXQ.J=g(.;OS'.ueA.1/.*K}.`/F'. 8u{.s9s{.Ohi(.,lm{.s9s{.2/#&.*0J.lE>'.1`}&.-]}&.vMa(.zp='.<cN'.=j12")
    }
    func_RocketExplodeTouch = okapi_build_method(func_RocketTouch_ptr, arg_void, arg_cbase, arg_cbase)
    okapi_add_hook(func_RocketExplodeTouch,"On_func_RocketExplodeTouch", 0) // 1 = post


    // ZOOM FUNC
    
    // ?ThinkZoomOut@CBasePlayerWeapon@@QAEXXZ
    // ?ThinkZoomOutIn@CScopedKar@@QAEXXZ

    new func_ThinkZoomOutIn_CBasePlayerWeapon_ptr = okapi_mod_get_symbol_ptr("?ThinkZoomOut@CBasePlayerWeapon@@QAEXXZ") 
    if(!func_ThinkZoomOutIn_CBasePlayerWeapon_ptr)
    {   

    //install_gamerules_ptr = okapi_get_treemap_ptr("[TG.;nC'.pbG.sXQ.J=g(.;OS'.ueA.1/.*K}.`/F'. 8u{.s9s{.Ohi(.,lm{.s9s{.2/#&.*0J.lE>'.1`}&.-]}&.vMa(.zp='.<cN'.=j12")
    }
    func_ThinkZoomOutIn_CBasePlayerWeapon = okapi_build_method(func_ThinkZoomOutIn_CBasePlayerWeapon_ptr, arg_cbase, arg_cbase)
    okapi_add_hook(func_ThinkZoomOutIn_CBasePlayerWeapon,"On_func_ThinkZoomOutIn", 0) // 1 = post
    
    ////
    new func_ThinkZoomOutIn_CScopedKar_ptr = okapi_mod_get_symbol_ptr("?ThinkZoomOutIn@CScopedKar@@QAEXXZ")
    if(!func_ThinkZoomOutIn_CScopedKar_ptr)
    {   

    //install_gamerules_ptr = okapi_get_treemap_ptr("[TG.;nC'.pbG.sXQ.J=g(.;OS'.ueA.1/.*K}.`/F'. 8u{.s9s{.Ohi(.,lm{.s9s{.2/#&.*0J.lE>'.1`}&.-]}&.vMa(.zp='.<cN'.=j12")
    }
    func_ThinkZoomOutIn_CScopedKar = okapi_build_method(func_ThinkZoomOutIn_CScopedKar_ptr, arg_cbase, arg_cbase)
    okapi_add_hook(func_ThinkZoomOutIn_CScopedKar,"On_func_ThinkZoomOutIn", 0) // 1 = post





}

public Set_fov_post(id)
{
    client_print(0, print_chat, "FOV POST")

    new fov = read_data(1)
    return fov
}
__________________

Last edited by TheVaskov; Today at 03:29.
TheVaskov is offline
Reply



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 04:12.


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