[Tutorial] How to hook FUNCTIONS (not callbacks)
#5

Quote:
Originally Posted by Luka P.
Посмотреть сообщение
pawn Код:
forward _ALT_GivePlayerMoney(playerid, money);public _ALT_GivePlayerMoney(playerid, money)
{
    // YOU CAN DO WHATEVER HERE NOW, THIS IS THE CODE THAT GETS EXECUTED BEFORE CALLING
    // GIVEPLAYERMONEY EVERYTIME YOU USE THE FUNCTION. WE'RE GONNA SET THE AMOUNT INTO PVAR
    SetPVarInt(playerid, "Money", GetPVarInt(playerid, "Money") + money);
   
    return CallRemoteFunction("call_GivePlayerMoney", "ii", playerid, money);
}
#define GivePlayerMoney _ALT_GivePlayerMoney
Little mistake there, forgot to put a new line
Reply


Messages In This Thread
How to hook FUNCTIONS (not callbacks) - by Luka P. - 01.11.2010, 16:36
Re: How to hook FUNCTIONS (not callbacks) - by Hiddos - 01.11.2010, 16:40
Re: How to hook FUNCTIONS (not callbacks) - by Luka P. - 01.11.2010, 16:46
Re: How to hook FUNCTIONS (not callbacks) - by Aleluja - 01.11.2010, 16:50
Re: How to hook FUNCTIONS (not callbacks) - by WillyP - 01.11.2010, 17:42
Re: How to hook FUNCTIONS (not callbacks) - by Luka P. - 01.11.2010, 17:46
Re: How to hook FUNCTIONS (not callbacks) - by Kwarde - 01.11.2010, 17:59
Re: How to hook FUNCTIONS (not callbacks) - by HyperZ - 01.11.2010, 18:01
Re: How to hook FUNCTIONS (not callbacks) - by Hiddos - 01.11.2010, 18:05
Re: How to hook FUNCTIONS (not callbacks) - by Luka P. - 01.11.2010, 18:05

Forum Jump:


Users browsing this thread: 1 Guest(s)