20.02.2012, 21:32
hi,
i use the include by BigEti. (source: https://sampforum.blast.hk/showthread.php?tid=280549)
But if i make the anti money hack like this it detects cheated money but it also kicks a lot of non cheaters!
Can someone tell me what to adjust here?
Or if u dont know then please tell me or link me to some other effective anti money hack codes.
thx in advance!
Hope someone can help me
i use the include by BigEti. (source: https://sampforum.blast.hk/showthread.php?tid=280549)
But if i make the anti money hack like this it detects cheated money but it also kicks a lot of non cheaters!
Can someone tell me what to adjust here?
Or if u dont know then please tell me or link me to some other effective anti money hack codes.
thx in advance!
pawn Код:
enum AC_Infos
{
AC_Money,
bool:AC_MoneySync,
};
new AC_Info[MAX_PLAYERS][AC_Infos];
public OnPlayerDisconnect(playerid, reason)
{
AC_Info[playerid][AC_Money] = 0;
AC_Info[playerid][AC_MoneySync] = false;
return 1;
}
public OnPlayerSpawn(playerid)
{
AC_Info[playerid][AC_MoneySync] = true;
return 1;
}
public OnPlayerMoneyChange(playerid, oldmoney, newmoney)
{
if(newmoney < 0)
{
ResetPlayerMoney(playerid);
GiveMoney(playerid,oldmoney);
SendClientMessageToAll(0xFF0000FF,"Kick due money hack!");
Kick(playerid);
}
else if(AC_Info[playerid][AC_MoneySync])
{
if(AC_Info[playerid][AC_Money] > newmoney) AC_Info[playerid][AC_Money] = newmoney;
else if(AC_Info[playerid][AC_Money] < newmoney)
{
ResetPlayerMoney(playerid);
GiveMoney(playerid,oldmoney);
SendClientMessageToAll(0xFF0000FF,"Kick due money hack!");
Kick(playerid);
}
}
else if(AC_Info[playerid][AC_Money] >= newmoney) AC_Info[playerid][AC_MoneySync] = true;
return AC_Info[playerid][AC_MoneySync];
}
//I give the money like: GiveMoney(playerid,amount);
stock GiveMoney(playerid, amount)
{
AC_Info[playerid][AC_MoneySync] = false;
AC_Info[playerid][AC_Money] += amount;
GivePlayerMoney(playerid,amount);
}
