hook problem
#1

Hello. I'm using ALS hooking method, I have an include with bunch of:
Код:
stock AC_SetPlayerHealth(playerid,Float:amount)
{
    SetPVarInt(playerid, "Synced", GetTickCount());
    SetPVarFloat(playerid,"faPlayerHealth",amount);
    return SetPlayerHealth(playerid,amount);
}

#if defined _ALS_SetPlayerHealth
    #undef SetPlayerHealth
#else
    #define _ALS_SetPlayerHealth
#endif
#define SetPlayerHealth AC_SetPlayerHealth
And it works fine, but when I try to hook another function in my filterscript, which has this include included, then the hooks from the include in this filterscript stop working. I have this in my FS, it goes after the include:

Код:
stock EX_SetPlayerScore(playerid,score)
{
    SetPlayerProgressBarValue(playerid, bar[playerid],score);
    UpdatePlayerProgressBar(playerid, bar[playerid]);
    return SetPlayerScore(playerid, score);
}

#if defined _ALS_SetPlayerScore
	#undef SetPlayerScore
#else
	#define _ALS_SetPlayerScore
#endif
#define SetPlayerScore EX_SetPlayerScore
Any ideas?
Reply


Messages In This Thread
hook problem - by exclide1 - 04.08.2013, 10:20

Forum Jump:


Users browsing this thread: 1 Guest(s)