27.02.2016, 17:29
(
Последний раз редактировалось [XST]O_x; 27.02.2016 в 19:14.
Причина: Still not solved
)
I'm trying to hook OnGameModeInit from 2 different includes:
main.pwn:
dest_management.pwn
work.pwn
I'm following this tutorial:
https://sampforum.blast.hk/showthread.php?tid=597338
The problem is, main.pwn OnGameModeInit is called, and then dest_management.pwn OnGameModeInit is called, and that's it. work.pwn is completely ignored and not included. I can write random bullshit on the .pwn file but I don't get any errors after compiling, and work.pwn OnGameModeInit is not called.
main.pwn:
pawn Код:
#include <a_samp>
public OnGameModeInit()
{
OnGameModeEx();
#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
#include <YSI\YSI\y_hooks>
pawn Код:
#include <YSI\YSI\y_hooks>
hook OnGameModeInit()
{
print("dest_management.pwn OnGameModeInit called.");
return 1;
}
pawn Код:
#include <YSI\YSI\y_hooks>
hook OnGameModeInit()
{
print("work.pwn OnGameModeInit called.");
return 1;
}
https://sampforum.blast.hk/showthread.php?tid=597338
The problem is, main.pwn OnGameModeInit is called, and then dest_management.pwn OnGameModeInit is called, and that's it. work.pwn is completely ignored and not included. I can write random bullshit on the .pwn file but I don't get any errors after compiling, and work.pwn OnGameModeInit is not called.