13.04.2015, 11:25
May I ask for an explanation? What does it do? What can it help me with?
Hooking means to add something on a particular thing. Here, we refer it to adding something too on a callback or function. For example, function 'SetPlayerScore' sets the player's score. But if we are using a server sided score system, the 'SetPlayerScore' won't set it. So, we've gotta set that server sided score too by setting variables. |
hook function(playerid)
{
// something
}
public function(playerid)
{
#if defined something_function
return something_function(playerid);
#else
return true;
#endif
}
#if defined _ALS_function
#undef function
#else
#define _ALS_function
#endif
#define function something_function
#if defined something_function
forward something_function(playerid);
#endif
Originally Posted by Southclaw
Public functions and regular functions can be hooked and they require different methods. The two primary methods of hooking are: ALS and y_hooks (only works on publics).
|