[Y_Hooks] Callback's name replacement
#1

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:
PHP код:
// Create the default replacements.
DEFINE_HOOK_REPLACEMENT(CheckpointCP );
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(SpawnSpw); 
The problem is, no one of my hook is called when I use replacement.
PHP код:
hook OnPlayerSpw(playerid)
{
    
printf("[DEBUGG] OnPlayerSpw CALLED");
    return 
Y_HOOKS_CONTINUE_RETURN_1;
}
hook OnPlayerCmdPerformed(playeridcmdtext[], success)
{
    
printf("OnPlayerCmdPerformed: '%s'"cmdtext);
    return 
Y_HOOKS_CONTINUE_RETURN_1;

Of course, I did not modify the include (except adding 'DEFINE_HOOK_REPLACEMENT(Spawn, Spw)').
Have you some suggestions? Ideas or something?
Reply


Messages In This Thread
[Y_Hooks] Callback's name replacement - by Dayrion - 10.06.2017, 13:21
Re: [Y_Hooks] Callback's name replacement - by Nicow - 10.06.2017, 20:49
Re: [Y_Hooks] Callback's name replacement - by OneDay - 10.06.2017, 22:16
Re: [Y_Hooks] Callback's name replacement - by Dayrion - 10.06.2017, 23:47
Re: [Y_Hooks] Callback's name replacement - by Nicow - 11.06.2017, 12:29
Re: [Y_Hooks] Callback's name replacement - by Dayrion - 11.06.2017, 23:00
Re: [Y_Hooks] Callback's name replacement - by Nicow - 12.06.2017, 18:30
Re: [Y_Hooks] Callback's name replacement - by Dayrion - 13.06.2017, 01:43
Re: [Y_Hooks] Callback's name replacement - by Nicow - 13.06.2017, 05:21

Forum Jump:


Users browsing this thread: 1 Guest(s)