[Include] [SPC] Custom Damage
#4

Quote:
Originally Posted by Scaleta
Посмотреть сообщение
The damage values were off the top of my head and are meant to be edited. As for the hooking, would you suggest another method of doing so, as it works fine.
According to the one I use these days:
pawn Код:
public OnPlayerConnect(playerid)
{
    //codes.
    #if defined LIBNAME_OnPlayerConnect
    return LIBNAME_OnPlayerConnect(playerid); //This is being done to get this include compatible with the scripts using it. So in case if those scripts too use the same callback, it would call it.
    #else
    return 1;
    #endif
}

#if defined _ALS_OnPlayerConnect
    #undef OnPlayerConnect
#else
    #define _ALS_OnPlayerConnect
#endif

#define OnPlayerConnect LIBNAME_OnPlayerConnect

#if defined LIBNAME_OnPlayerConnect
forward LIBNAME_OnPlayerConnect(playerid);
#endif
^
This hook method being used is some what called "Hook method 7" and you can get the tutorial of it explained well from the below link. I'm also adding the old hooking method's tutorial which would probably fix your confusion about hooking process.

https://sampforum.blast.hk/showthread.php?tid=441293 - Hook method 7
https://sampforum.blast.hk/showthread.php?tid=392061 - Normal hooking.
Reply


Messages In This Thread
[SPC] Custom Damage (Now on GitHub!) - by Scaleta - 24.02.2014, 02:36
Re: [SPC] Custom Damage - by Lordzy - 24.02.2014, 02:42
Re: [SPC] Custom Damage - by Scaleta - 24.02.2014, 02:48
Re: [SPC] Custom Damage - by Lordzy - 24.02.2014, 07:48
Re: [SPC] Custom Damage - by Scaleta - 25.02.2014, 00:51
Re: [SPC] Custom Damage - by John_Cooper - 10.03.2014, 20:01

Forum Jump:


Users browsing this thread: 2 Guest(s)