10.06.2017, 13:21 
	
	
	
		Hello.
I've some problems with y_hooks. As you know, you can replace any name part of a callback by a diminutive to prevent the error of 32 characters.
This code is in the YSI's include:
The problem is, no one of my hook is called when I use replacement.
Of course, I did not modify the include (except adding 'DEFINE_HOOK_REPLACEMENT(Spawn, Spw)').
Have you some suggestions? Ideas or something?
	
	
	
I've some problems with y_hooks. As you know, you can replace any name part of a callback by a diminutive to prevent the error of 32 characters.
This code is in the YSI's include:
PHP код:
// Create the default replacements.
DEFINE_HOOK_REPLACEMENT(Checkpoint, CP );
DEFINE_HOOK_REPLACEMENT(Container , Cnt);
DEFINE_HOOK_REPLACEMENT(Inventory , Inv);
DEFINE_HOOK_REPLACEMENT(Dynamic   , Dyn);
DEFINE_HOOK_REPLACEMENT(TextDraw  , TD );
DEFINE_HOOK_REPLACEMENT(Update    , Upd);
DEFINE_HOOK_REPLACEMENT(Object    , Obj);
DEFINE_HOOK_REPLACEMENT(Command   , Cmd);
DEFINE_HOOK_REPLACEMENT(DynamicCP , DynamicCP);
DEFINE_HOOK_REPLACEMENT(Spawn, Spw); 
PHP код:
hook OnPlayerSpw(playerid)
{
    printf("[DEBUGG] OnPlayerSpw CALLED");
    return Y_HOOKS_CONTINUE_RETURN_1;
}
hook OnPlayerCmdPerformed(playerid, cmdtext[], success)
{
    printf("OnPlayerCmdPerformed: '%s'", cmdtext);
    return Y_HOOKS_CONTINUE_RETURN_1;
} 
Have you some suggestions? Ideas or something?






 
	