SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 27/02/2010, 03:16 PM   #1
ashiuashiu
Little Clucker
 
Join Date: Apr 2007
Posts: 29
Reputation: 3
Default [INC] Money Protect v1.1 (Anti Money Hack)

Description

Unlike other similar includes, this is EXTREMELY simple to use. You only need to put #include <moneyprotect> on the top of your code, and the include does all the dirty job.

Use

As I said before, you only need to put #include <moneyprotect> on the top of your script

It's possible to adjust the timer interval for the money check, by simply putting #define MP_TIMER_INTERVAL <interval> befor the #include directive, where <interval> is the time given in miliseconds for the money check.

Example:

pawn Code:
#define MP_TIMER_INTERVAL 200 //set a time of 200ms for the money check
#include <moneyprotect>

There is a callback, called OnMoneyCheatDetect, which informs when a possible money hack is detected. An exemple:

pawn Code:
public OnMoneyCheatDetect(playerid, amount)
{
  new str[128], pname[MAX_PLAYER_NAME];
  GetPlayerName(playerid, pname, sizeof pname);
  format(str, sizeof str, "%s was detected with a money hack of $%d", pname, amount);
  SendClientMessageToAll(COLOR_BLUE, str);
  return 1;
}

As default, the detected money is only decreased, but with the OnMoneyCheatDetect callback, you could take a more severe action, like kick or ban the player.

Notes

If used in a filterscript, the script must contain the #define FILTERSCRIPT directive BEFORE #include <moneyprotect>. Also, the gamemode script must be compiled with the include, in order to function properly.

Download

Pastebin
Megaupload

In case of bugs, or if you have suggestions, feel free to comment.
ashiuashiu is offline   Reply With Quote
Old 27/02/2010, 03:20 PM   #2
[03]Garsino
Guest
 
Posts: n/a
Default Re: [INC] Money Protect v1.1 (Anti Money Hack)

What if the player buys something from ammunation, clucking bell or any other food resturant?

It will detect it as money hacks.
  Reply With Quote
Old 27/02/2010, 03:32 PM   #3
^Woozie^
Big Clucker
 
^Woozie^'s Avatar
 
Join Date: Jul 2007
Posts: 84
Reputation: 15
Default Re: [INC] Money Protect v1.1 (Anti Money Hack)

http://forum.sa-mp.com/index.php?topic=143570.0
^Woozie^ is offline   Reply With Quote
Old 27/02/2010, 03:38 PM   #4
ashiuashiu
Little Clucker
 
Join Date: Apr 2007
Posts: 29
Reputation: 3
Default Re: [INC] Money Protect v1.1 (Anti Money Hack)

Quote:
Originally Posted by [03
Garsino ]
What if the player buys something from ammunation, clucking bell or any other food resturant?

It will detect it as money hacks.
No, it won't. It only detects as money hack if the client-side money is greater than the server-side money. If it's smaller, the script automatically decreases the server-side money.

Also, it's better to disable stunt bonuses and casino entrances or you'll get fake detections.

Quote:
Originally Posted by ^Psycho^
Mine (I think) is better, because you don't need to rename any functions. The script automatically hooks the internal money functions (GetPlayerMoney, GivePlayerMoney and ResetPlayerMoney), so you don't need to care about that. And it has a callback, which is nice too.
ashiuashiu is offline   Reply With Quote
Old 27/02/2010, 03:57 PM   #5
^Woozie^
Big Clucker
 
^Woozie^'s Avatar
 
Join Date: Jul 2007
Posts: 84
Reputation: 15
Default Re: [INC] Money Protect v1.1 (Anti Money Hack)

Too many superfluous actions and 200ms timer - why?
^Woozie^ is offline   Reply With Quote
Old 27/02/2010, 04:07 PM   #6
ashiuashiu
Little Clucker
 
Join Date: Apr 2007
Posts: 29
Reputation: 3
Default Re: [INC] Money Protect v1.1 (Anti Money Hack)

Quote:
Originally Posted by ^Psycho^
Too many superfluous actions and 200ms timer - why?
Well, the internal timer is 500ms actually, but you can change it the way you like.

And there is no superfluous actions, if you see the code and understand it, you'll realize that everything was coded with performance AND easiness in mind.
ashiuashiu is offline   Reply With Quote
Old 12/03/2010, 01:53 PM   #7
.:HustLeR:.
Big Clucker
 
Join Date: Dec 2009
Posts: 53
Reputation: 1
Default Re: [INC] Money Protect v1.1 (Anti Money Hack)

D:\Games\GTA San Andreas\pawno\include\moneyprotect.inc(65) : error 017: undefined symbol "MAX_PLAYERS"
D:\Games\GTA San Andreas\pawno\include\moneyprotect.inc(65) : error 009: invalid array size (negative, zero or out of bounds)
D:\Games\GTA San Andreas\pawno\include\moneyprotect.inc(73) : error 017: undefined symbol "MAX_PLAYERS"
D:\Games\GTA San Andreas\pawno\include\moneyprotect.inc(73) : error 017: undefined symbol "IsPlayerConnected"
D:\Games\GTA San Andreas\pawno\include\moneyprotect.inc(73) : warning 215: expression has no effect
D:\Games\GTA San Andreas\pawno\include\moneyprotect.inc(73) : error 001: expected token: ";", but found ")"
D:\Games\GTA San Andreas\pawno\include\moneyprotect.inc(73) : fatal error 107: too many error messages on one line

...
.:HustLeR:. is offline   Reply With Quote
Old 12/03/2010, 05:21 PM   #8
Moglizorz.
Big Clucker
 
Moglizorz.'s Avatar
 
Join Date: Feb 2009
Posts: 155
Reputation: 2
Default Re: [INC] Money Protect v1.1 (Anti Money Hack)

Show the lines.
__________________
<b>Current Project:</b> Cops and Robbers Server (EST: August 2014)
Our new CnR server will boast a new, exciting environment to which Cops and Robbers fanatics have never seen previous. More to come.
Moglizorz. is offline   Reply With Quote
Old 12/03/2010, 07:34 PM   #9
.:HustLeR:.
Big Clucker
 
Join Date: Dec 2009
Posts: 53
Reputation: 1
Default Re: [INC] Money Protect v1.1 (Anti Money Hack)

hmm the lines ?? xD how can i found the lines in a ini. file = notepad
.:HustLeR:. is offline   Reply With Quote
Old 12/03/2010, 07:38 PM   #10
[03]Garsino
Guest
 
Posts: n/a
Default Re: [INC] Money Protect v1.1 (Anti Money Hack)

ctrl+g
  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] Money Protect v1.1 (Anti Money Hack) ashiuashiu Lançamentos/Releases 13 18/12/2011 06:35 PM
[FS]Anti Money Hack? steven_italy Help Archive 7 17/12/2010 06:26 PM
anti-money hack versus money hack impossibility(?) maij Help Archive 6 11/08/2010 01:58 AM
Anti Money Hack Alxxie Română/Romanian 1 11/05/2010 06:05 PM
[HELP] anti money hack akis_tze Help Archive 5 17/01/2010 06:35 PM


All times are GMT. The time now is 08:40 PM.


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