Custom function hook (y_hooks)
#7

Код:
#include <a_samp>
#include <mysql>
#include <zcmd>
#include <foreach>
#include <YSI\y_timers>
#include <YSI\y_hooks>


public OnGameModeInit()
{

	OnGameModeInitEx();

	#if defined main_OnGameModeInit
		return main_OnGameModeInit();
	#else
		return 1;
	#endif
}

	#if defined _ALS_OnGameModeInit
		#undef OnGameModeInit
	#else
		#define _ALS_OnGameModeInit
	#endif

#define OnGameModeInit main_OnGameModeInit
#if defined main_OnGameModeInit
	forward main_OnGameModeInit();
#endif

main(){}

/*======================================================================================================
										[Modules]
=======================================================================================================*/

//Player
#include "core/player/data.pwn"

//Vehicles
#include "core/vehicles/data.pwn"


/*======================================================================================================
										[Main]
======================================================================================================*/




OnGameModeInitEx()
{
	
}


main_OnGameModeInit()
{
	ResetDataTest();
	return 1;
}

public OnGameModeExit()
{

	return 1;
}


Public:ResetDataTest()
{
	printf("test1");
	return 1;
}
Код:
==========core/vehicles/data.pwn file===========
#include <YSI\y_hooks>

hook OnGameModeInit()
{
	print("core/vehicles/data.pwn loaded");
}

hook ResetDataTest(){
	printf("Data vehicles");
}


==========core/player/data.pwn file===========
#include <YSI\y_hooks>

hook OnGameModeInit()
{
	print("core/player/data.pwn loaded");
}

hook ResetDataTest(){
	printf("Data players");
}
And at both hook's it says invalid function
Reply


Messages In This Thread
Custom function hook (y_hooks) - by Stefand - 01.06.2018, 16:20
Re: Custom function hook (y_hooks) - by iSpark - 01.06.2018, 17:31
Re: Custom function hook (y_hooks) - by Stefand - 01.06.2018, 17:35
Re: Custom function hook (y_hooks) - by iSpark - 01.06.2018, 18:01
Re: Custom function hook (y_hooks) - by Stefand - 01.06.2018, 18:08
Re: Custom function hook (y_hooks) - by Stefand - 03.06.2018, 09:14
Re: Custom function hook (y_hooks) - by Stefand - 03.06.2018, 09:53
Re: Custom function hook (y_hooks) - by Stefand - 03.06.2018, 11:45

Forum Jump:


Users browsing this thread: 1 Guest(s)