I was playing around with the func_tanks using orpheu.
The idea was to make like a cooldown for it.
I hooked CFunkTank::StartControl but when i use a func_tank, my game freezes.
I don't understand why this is happening, i only hooked the function.
I tried to print a msg at first but then commented it because of the crashes
Tested on map: am_gunattack_v3
PHP Code:
#include <amxmodx>
#include <orpheu>
#define VERSION "1.0.0"
public plugin_init()
{
register_plugin("Func Tank", VERSION, "Drekes");
OrpheuRegisterHook(OrpheuGetFunction("StartControl", "CFuncTank"), "CFuncTankStartControl");
}
public CFuncTankStartControl(id)
{
// client_print(0, print_chat, "StartControl called");
}
Code:
{
"name" : "StartControl",
"class" : "CFuncTank",
"library" : "mod",
"arguments" :
[
{
"type" : "CBasePlayer *"
}
],
"identifiers":
[
{
"os" : "windows",
"mod" : "cstrike",
"value" : [0x74,0x07,0x5F,0x33,0xC0,0x5E,0xC2,0x04,0x00,0x8B,0x86,0x04,0x01,0x00,0x00,0x8B]
},
{
"os" : "linux",
"mod" : "cstrike",
"value" : "StartControl__9CFuncTankP11CBasePlayer"
}
]
}
__________________