ALS 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: ALS hook problem (
/showthread.php?tid=663867)
ALS hook problem -
None1337 - 13.02.2019
So, i'm trying to hook OnPlayerConnect with ALS and i'm getting this error:
Код:
error 021: symbol already defined: "SSCANF_OnPlayerConnect"
How should I fix this?
Код:
public OnPlayerConnect(playerid)
{
printf("[ALS_hook] OnPlayerConnect(%d)", playerid);
#if defined on_OnPlayerConnect
return on_OnPlayerConnect(playerid);
#else
return 1;
#endif
}
#if defined _ALS_OnPlayerConnect
#undef OnPlayerConnect
#else
#define _ALS_OnPlayerConnect
#endif
#define OnPlayerConnect on_OnPlayerConnect
#if defined on_OnPlayerConnect
forward on_OnPlayerConnect(playerid);
#endif
Re: ALS hook problem -
Marlborox - 14.02.2019
Код HTML:
hook OnPlayerConnect(playerid)
{
printf("[ALS_hook] OnPlayerConnect(%d)", playerid);
#if defined on_OnPlayerConnect
return on_OnPlayerConnect(playerid);
#else
return 1;
#endif
}
#if defined _ALS_OnPlayerConnect
#undef OnPlayerConnect
#else
#define _ALS_OnPlayerConnect
#endif
#define OnPlayerConnect on_OnPlayerConnect
#if defined on_OnPlayerConnect
forward on_OnPlayerConnect(playerid);
#endif