[Tool/Web/Other] [HTML] Online _ALS Generator [Callback and Function]
#10

Sorry, I should report these all at once:

pawn Код:
public Hooked_OnPlayerText(playerid, text[])
{
    //Your code here
    //Call the new version and check if the definition does exist.
    #if defined Hooked_OnPlayerText
        OnPlayerText(playerid, text[]);
    #endif
    return true;
}

//Has this been hooked already?
#if defined _ALS_OnPlayerText
    #undef OnPlayerText  
#else
    #define _ALS_OnPlayerText
#endif

//Reroute future calls to our function.
#define OnPlayerText Hooked_OnPlayerText

//To make sure there is no undefined error. we check if its defined.
#if defined Hooked_OnPlayerText
    forward Hooked_OnPlayerText(playerid, text[]);
#endif
Syntax error on the next call line. Same if you do "const text[]".

Also:

pawn Код:
stock Hooked_strcat(dest[], source[], maxlength = sizeof (dest))
{
    //Your code here
    //Call the old version, no need to check if it exists.
    strcat(dest[], source[], maxlength = sizeof (dest));
    return true;
}

//Has this been hooked already?
#if defined _ALS_strcat
    #undef strcat  
#else
    #define _ALS_strcat
#endif
//Reroute future calls to our function.
#define strcat Hooked_strcat
I do hope you can fix these issues! It looks like a useful tool.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)