09.03.2018, 19:03
So, I read this topic https://sampforum.blast.hk/showthread.php?tid=220089 about Using Stocks or Hooks
And I really don't understand. So, instant of using
my custom function
I should use this
Is not the same thing?
Using GivePlayerMoney should call the stock My_GivePlayerMoney, so is like when I use GivePlayerMoneyEx for example, right?
So, what should I use? my custom function or the function like in tutorial?
And I really don't understand. So, instant of using
my custom function
Код:
stock GivePlayerMoneyEx(playerid, money) { PlayerMoney[playerid] += money; return GivePlayerMoney(playerid, money); }
Код:
stock My_GivePlayerMoney(playerid, money) { PlayerMoney[playerid] += amount; return GivePlayerMoney(playerid, money); } #if defined _ALS_GivePlayerMoney #undef GivePlayerMoney #else #define _ALS_GivePlayerMoney #endif #define GivePlayerMoney My_GivePlayerMoney
Using GivePlayerMoney should call the stock My_GivePlayerMoney, so is like when I use GivePlayerMoneyEx for example, right?
So, what should I use? my custom function or the function like in tutorial?