SA-MP Forums Archive
y_hooks problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: y_hooks problem (/showthread.php?tid=473712)



y_hooks problem - Baltazar - 04.11.2013

So, I am trying to hook OnGameModeInit the second time through y_hooks method (simpy hook OnGameModeInit() ) and thats the error I get:

Код:
error 021: symbol already defined: "@yH_GameModeInit3"
What am I doing wrong?


Re: y_hooks problem - DobbysGamertag - 04.11.2013

Works fine for me:

pawn Код:
#include    a_samp
#include    ysi\y_hooks
main(){}

public OnGameModeInit()
{
    AddPlayerClass(0,132.6651,-67.3368,1.5781,237.7988,0,0,0,0,0,0);
    return 1;
}
hook OnGameModeInit()
{
    return 1;
}
public OnGameModeExit()
{
    return 1;
}