Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

[Y_Hooks] Callback's name replacement

$
0
0
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 Code:

// 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 Code:

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?

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>