[Tool/Web/Other] [NOT FOR NEWBIE] all callback hooks reference
#6

Quote:
Originally Posted by OstGot
Посмотреть сообщение
Or, for example:
Код:
public OnPlayerEnterRaceCheckpoint(playerid)
{
	#if defined mylib_OnPlayerEnterRaceCheckpoint
		mylib_OnPlayerEnterRaceCheckpoint(playerid);
	#else
		return 1;
	#endif
}

#if defined _ALS_OnPlayerEnter\ // <-
	RaceCheckpoint
	#undef OnPlayerEnterRaceCheckpoint
#else
	#define _ALS_OnPlayerEnterRaceCheckpoint
#endif
#define OnPlayerEnterRaceCheckpoint mylib_OnPlayerEnterRaceCheckpoint
#if defined mylib_OnPlayerEnterRaceCheckpoint
	forward mylib_OnPlayerEnterRaceCheckpoint(playerid);
#endif
No your example isn't correct either. You can't just cut the ALS name because not every script that hooks that callback will use the same ALS name if you do. Same goes for the other names. That is why there are already standard ALS names.
Reply


Messages In This Thread
[NOT FOR NEWBIE] callback hooks reference - by iLuXing - 05.03.2016, 00:49
Re: [NOT FOR NEWBIE] all callback hooks reference - by Emmet_ - 05.03.2016, 00:52
Re: [NOT FOR NEWBIE] all callback hooks reference - by iLuXing - 05.03.2016, 01:20
Re: [NOT FOR NEWBIE] all callback hooks reference - by Crayder - 05.03.2016, 02:02
Re: [NOT FOR NEWBIE] all callback hooks reference - by OstGot - 05.03.2016, 12:10
Re: [NOT FOR NEWBIE] all callback hooks reference - by Crayder - 05.03.2016, 15:59
Re: [NOT FOR NEWBIE] all callback hooks reference - by Slice - 08.03.2016, 08:46

Forum Jump:


Users browsing this thread: 1 Guest(s)