14.01.2011, 16:27
You will need to use the next OnPlayerConnect after the first one + it's definitions.
Also, you're only supposed to use the callback ONCE, the #define thingies are there to not generate errors the next time the CB gets called. And make sure the code gets reached ofc.
Also, you're only supposed to use the callback ONCE, the #define thingies are there to not generate errors the next time the CB gets called. And make sure the code gets reached ofc.
pawn Код:
public OnPlayerConnect(playerid)
{
if(funcidx("F_OnPlayerConnect") != -1)
{
return CallLocalFunction("F_OnPlayerConnect", "i", playerid);
}
return 1;
}
#if defined _ALS_OnPlayerConnect
#undef OnPlayerConnect
#else
#define _ALS_OnPlayerConnect
#endif
#define OnPlayerConnect F_OnPlayerConnect
forward F_OnPlayerConnect(playerid);
//In a different script (Or at least not the include)
public OnPlayerConnect(playerid)
{
//code
}