y_hooks.
#1

Can anyone please tell me what does y_hooks do? I've been looking around the forum but I couldn't find anything.
Reply
#2

Quote:
Originally Posted by ******
y_hooks - Hook any callback in one line!
y_hooks is for hooking a callback it's easier than using ALS_Hook

pawn Код:
#if defined _ALS_OnPlayerUpdate
    #undef OnPlayerUpdate
#else
    #define _ALS_OnPlayerUpdate
#endif
#define OnPlayerUpdate hook_OnPlayerUpdate
by using y_hook you could simple do this

pawn Код:
hook OnPlayerUpdate( parameters )
{

}
y_hooks: https://sampforum.blast.hk/showthread.php?tid=166016
ALS_Hook: https://sampforum.blast.hk/showthread.php?tid=441293
Reply
#3

So I can basically do something like, this correct?

pawn Код:
hook OnPlayerDeath(playerid, killerid, reason)
{
    SendClientMessage(playerid, -1, "You have died!");
}
Reply
#4

Yes.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)