Hook ZCMD commands
#6

I usually do it something like
pawn Код:
YCMD:enter(playerid, params[], help) {
    call OnPlayerEnter(playerid);

    return 1;
}
Then in includes
pawn Код:
hook OnPlayerEnter(playerid) {
    if(!IWantThisToBeCalled) return Y_HOOKS_CONTINUE_RETURN_1;

    //We open a door or shit
    return Y_HOOKS_BREAK_RETURN_1; //We break the chain so other callbacks are not called
}
Reply


Messages In This Thread
Hook ZCMD commands - by Jonesy96 - 07.06.2016, 07:35
Re: Hook ZCMD commands - by saffierr - 07.06.2016, 08:56
Re: Hook ZCMD commands - by Jonesy96 - 07.06.2016, 09:15
Re: Hook ZCMD commands - by Vince - 07.06.2016, 09:45
Re: Hook ZCMD commands - by PrO.GameR - 07.06.2016, 12:20
Re: Hook ZCMD commands - by Misiur - 07.06.2016, 12:23

Forum Jump:


Users browsing this thread: 1 Guest(s)