WHAT THE HELL!!!
Let's say we have 2 function that hook client_command.
First plugin:
PHP Code:
#include<amxmodx>
new new_laser_cmd[] = "+set_my_laser";
public plugin_init()
{
register_plugin("Plugin1 - Patch", "1.0", "");
}
public client_command(id)
{
new command[32],
read_argv(0, command, charsmax(command));
if (equali(command, "+setlaser"))
{
// Patch that read_argv(0, _, _)
// This function doesn't exists or I am not awared of it
// This will set the first argument into new_laser_cmd ("+set_my_laser")
set_argv(0, new_laser_cmd, charsmax(new_laser_cmd))
}
return PLUGIN_CONTINUE;
}
Second plugin:
PHP Code:
#include<amxmodx>
new new_laser_cmd[] = "+set_my_laser";
public plugin_init()
{
register_plugin("Plugin2 - The actual plugin", "1.0", "");
}
public client_command(id)
{
new command[32],
read_argv(0, command, charsmax(command)); // now command is not +setlaser, it's +set_my_laser because we patched it in the first plugin
if (equali(command, new_laser_cmd))
{
set_laser(id, command);
}
return PLUGIN_CONTINUE;
}
The first plugin replace "+setlaser" with "+set_my_laser" because that's why I wanted! The second one, the actual plugin, will not read "+setlaser" anymore, but instead of it will read "+set_my_laser" (because we replaced/patched it in first plugin).
This is just an example! So don't ask me to use client_cmd instead of patching!
I hope this time you will understand what I want!
So, there is such method or no? Doens't matter if I need to use orpheu to patch that. I really need a method to do that.