27.02.2010, 14:16
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:
There is a callback, called OnMoneyCheatDetect, which informs when a possible money hack is detected. An exemple:
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.
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>
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;
}
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.