SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Tutorials

Reply
 
Thread Tools Display Modes
Old 29/05/2010, 10:38 AM   #1
Kyle
High-roller
 
Kyle's Avatar
 
Join Date: Mar 2009
Location: United Kingdom
Posts: 2,390
Reputation: 314
Default [TUTORIAL] How To Stop Money Hackers!

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 Code:
PlayerCash[playerid] += amount here;


Step 1:

Place This At The Top Of Your Script.

pawn Code:
new PlayerMoney[MAX_PLAYERS];
new OldCash[MAX_PLAYERS];
forward PlayerTimer()

Then Place The Following Code Under Onplayerconnect and OnPlayerDisconnect
pawn Code:
PlayerMoney[playerid] = 0;
OldCash[playerid] = 0;

Step 2:

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

pawn Code:
SetTimer("PlayerTimer",1000,1);

Step 3:

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

pawn Code:
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!
Kyle is offline   Reply With Quote
Old 29/05/2010, 08:54 PM   #2
[NYRP]Mike.
Huge Clucker
 
Join Date: Sep 2009
Posts: 425
Reputation: 1
Default Re: [TUTORIAL] How To Stop Money Hackers!

It's good, I use the same thing on my script... Works all the time hehe...
[NYRP]Mike. is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Include] [INC] PCash - Tired of money hackers? Zezombia Includes 86 13/04/2012 12:48 PM
[Include] Server-sided Money - Stop money hackers! NEW RELEASE(v6) x-cutter Includes 107 30/08/2011 07:56 PM
[FilterScript] [FS] Money Cheat Detector || Stop money cheaters! Luka P. Filterscripts 23 05/09/2010 12:22 AM
[FilterScript] [FS][Tutorial] ServerSide Money Explained viKKmaN Filterscripts 6 16/02/2010 09:40 PM
A few tips to protect against hackers please? (real hackers not game hackers) ThePS3Guy Everything and Nothing 4 08/08/2009 03:09 PM


All times are GMT. The time now is 09:19 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.