Guides
Hooking
Farcall hooking
hook example_function()
{
//your code
}Usage
hook maps\mp\_example::example_function(p1, p2, etc)
{
//do whatever you want since this is a hook
ilog("example function hook, Param 1: ^1", p1);
ilog("example function hook, Param 2: ^1", p2);
//optional to call original farcall or alter params before calling original?
self maps\mp\_example::example_function(p1, p2, ...);
}Method hooking
hook method::example_function()
{
//your code
}Usage
hook method::iprintln(str, p1,p2,p3, etc)
{
ilog("iprintln hooked");
self iprintln(str, p1,p2,p3, ...);
}Builtin functions
hook function::example_function()
{
//your code
}Usage
hook function::spawn(model, origin, flags, radius, height)
{
ilog("spawn hooked");
return spawn(model, origin, flags, radius, height);
}Last updated on