hook problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: hook problem (
/showthread.php?tid=456034)
hook problem -
exclide1 - 04.08.2013
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?