03.06.2018, 09:53
Код:
#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"); }