03.10.2013, 22:20
Quote:
Aн que estб, irei divulgar a Include, entгo nгo tem como saber se serб ou nгo usada, vai depender do cуdigo de quem baixar..
Enfim, obrigado pela ajuda ![]() +rep |
Te fiz um exemplo de hook aqui que nгo darб erro caso o usuбrio nгo insira a callback que vocк fez o hook...
Exemplo Include usando OnGameModeInit
pawn Код:
forward whook_OnGameModeInit();
public OnGameModeInit()
{
printf("Hooked callback");
if (funcidx("whook_OnGameModeInit") != -1)
return CallLocalFunction("whook_OnGameModeInit", "");
return 1;
}
#if defined ALS_OnGameModeInit
#undef OnGameModeInit
#else
#define OnGameModeInit whook_OnGameModeInit
#endif
pawn Код:
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
printf("Normal callback");
return 1;
}