Hi, Help with the anti-cheat.
#1

I'm trying to make one, but i couldn't, so i'm watching out the filterscripts i've searched alot for one. But, all of them when i try to givemoney(anti-money hack) with my admin duty, or setarmour (anti-armour)
It kicks/ resets my hp/army/money. Because, when i try to use my commands it detect it as a cheat, any ideas for stuff like this? Which i can add?
Reply
#2

Post your givemoney command, and the detection code

EDIT: My guess is you don't use the same "give money function"
Reply
#3

You need to Mix Your Filterscripts With You administrator filterscripts because its different section
So when you mixed it Just add condition Like :
PHP код:
new givenbyadmin[MAX_PLAYERS]; 
PHP код:
OnPlayerUpdate 
pawn Код:
if(Detect Money anti cheat blah blah && givenbyadmin == false)
{
   Do Condition
}
pawn Код:
CMD:givemoney
{
  Your Condition Blah Blah
  givenbyadmin [target] = true;
}
and
PHP код:
OnPlayerDisconnect
{
  
Blahblah
 givenbyadmin
[playerid] = false;

Just Example for your idea
Reply
#4

Quote:
Originally Posted by colonel-top
Посмотреть сообщение
You need to Mix Your Filterscripts With You administrator filterscripts because its different section
So when you mixed it Just add condition Like :
PHP код:
new givenbyadmin[MAX_PLAYERS]; 
PHP код:
OnPlayerUpdate 
pawn Код:
if(Detect Money anti cheat blah blah && givenbyadmin == false)
{
   Do Condition
}
pawn Код:
CMD:givemoney
{
  Your Condition Blah Blah
  givenbyadmin [target] = true;
}
and
PHP код:
OnPlayerDisconnect
{
  
Blahblah
 givenbyadmin
[playerid] = false;

Just Example for your idea
There's rarely any need for using OnPlayerUpdate now that there's OnPlayerTakeDamage. Money AC kan be checked on timer with several seconds interval.
Reply
#5

I've tried to do like you said, but I've a little problem..
pawn Код:
forward CheckMoney();
public CheckMoney()
{
      for(new i = 0; i < MAX_PLAYERS; i++)
      {
            if(GetPlayerMoney(i) > NewMoney[i] && givenbyadmin[i] == false)
            {
                ResetPlayerMoney(NewMoney[i]);
            }
      }
      return 1;
}
warring: tag mis-match.
Reply
#6

Код:
ResetPlayerMoney(playerid);
Reset player money goes like this
Reply
#7

Quote:
Originally Posted by Micko123
Посмотреть сообщение
Код:
ResetPlayerMoney(playerid);
Reset player money goes like this
This will reset all the player money, But with that one it will only reset the new money means the hacked money
Reply
#8

The error near &&
Reply
#9

Try (maybe i'm wrong)
PHP код:
forward CheckMoney();
public 
CheckMoney()
{
      for(new 
0MAX_PLAYERSi++)
      {
            new 
oldMoney GetPlayerMoney(i)
              if(
oldMoney NewMoney[i] && !givenbyadmin[i])
              {
                  
ResetPlayerMoney(i);
                  
GivePlayerMoney(ioldMoney);
            }
      }
      return 
1;

Reply
#10

Thanks, It's working now. I added more stuffs for this ;-;.
+REP for all of you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)