02.01.2013, 10:08
for exemple i have a my include (eg. called "inc_1") in my gm whit a lot of function/macros and so on
i have for exemple this stock
in my anticheat include (posted next to "inc_1", called "inc_2") for exemple i have this
Now if in my gm i do this
SetPlayerMoney work but "S_Cheat_GivePlayerMoney" isn't called why??
for fix this issue i have to do this in my anticheat
It's the only solution in addition to this
i have for exemple this stock
PHP код:
stock SetPlayerMoney(playerid, amount)
{
ResetPlayerMoney(playerid);
return GivePlayerMoney(playerid, amount);
}
PHP код:
stock S_Cheat_GivePlayerMoney(playerid, money)
{
if(GetPlayerCheatStatus(CHEAT_PLAYER_MONEY) == true) S_PlayerInfo[playerid][PLAYER_MONEY]=GetPlayerMoney(playerid)+money;
return GivePlayerMoney(playerid, money);
}
#if defined _ALS_GivePlayerMoney
#undef GivePlayerMoney
#else
#define _ALS_GivePlayerMoney
#endif
#define GivePlayerMoney S_Cheat_GivePlayerMoney
PHP код:
#include <inc_1>
#include <inc_2>
public OnSomeCallBackCall(playerid,...)
{
SetPlayerMoney(playerid, amount);
}
for fix this issue i have to do this in my anticheat
PHP код:
stock S_Cheat_SetPlayerMoney(playerid, amount)
{
if(GetPlayerCheatStatus(CHEAT_PLAYER_MONEY) == true) S_PlayerInfo[playerid][PLAYER_MONEY]=amount;
return SetPlayerMoney(playerid, amount);
}
#if defined _ALS_SetPlayerMoney
#undef SetPlayerMoney
#else
#define _ALS_SetPlayerMoney
#endif
#define SetPlayerMoney S_Cheat_SetPlayerMoney
PHP код:
#include <inc_2>
#include <inc_1>