[Include] [INC] Money Protect v1.1 (Anti Money Hack)
#1

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.
Reply
#2

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

It will detect it as money hacks.
Reply
#3

http://forum.sa-mp.com/index.php?topic=143570.0
Reply
#4

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.
Reply
#5

Too many superfluous actions and 200ms timer - why?
Reply
#6

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.
Reply
#7

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

...
Reply
#8

Show the lines.
Reply
#9

hmm the lines ?? xD how can i found the lines in a ini. file = notepad
Reply
#10

ctrl+g
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)