[TUTORIAL] How To Stop Money Hackers!
#1

This tutorial will stop cash hackers, But the only problem is that tranfender is free! Anyway Enjoy.

Also: If you want to give people cash do,

pawn Код:
PlayerCash[playerid] += amount here;

Step 1:

Place This At The Top Of Your Script.

pawn Код:
new PlayerMoney[MAX_PLAYERS];
new OldCash[MAX_PLAYERS];
forward PlayerTimer()
Then Place The Following Code Under Onplayerconnect and OnPlayerDisconnect
pawn Код:
PlayerMoney[playerid] = 0;
OldCash[playerid] = 0;
Step 2:

Put this code under OnGameModeInit, This will set a timer for PlayerTimer to declare.

pawn Код:
SetTimer("PlayerTimer",1000,1);
Step 3:

Then This Public Will Check If Its Severside Cash Increase Or Client.

pawn Код:
public PlayerTimer()
{
  for(new i=0; i<MAX_PLAYERS; i++)
  {
    if(IsPlayerConnected(i))
    {
      if(GetPlayerMoney(i) != PlayerCash[i])
      {
         OldCash[i] = GetPlayerMoney(i);
      ResetPlayerMoney(i);
      GivePlayerMoney(i,PlayerCash[i]);
      return 1;
        }
       }
    }
    return 1;
}
Sorry About Indentation!
Reply
#2

It's good, I use the same thing on my script... Works all the time hehe...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)