[Include] [INC] Fallout's Anti Money Cheat System - inc works on multiple scripts!
#1

Fallout's Anti Money Cheat System



Introduction:
I know that there are many anti money cheat systems on this forum, but they don't work on multiple scripts
like when you want to use it in your gamemode and also in some other filterscripts

(That is because you have integers in the include (the value of money for every player) and if it changes in your gamemode, than the value in the filterscript doesn't change.
this causes a difference between the integer and the money of the player -> kick/ban.
)

Because this include saves the integers in files, you don't have that problem and it's possible to include this into more than 1 script!


How to install:
- Put this inc in this folder: server\pawno\include\<here>
- Add this folder! server\scriptfiles\F_AntiCheat\
- Add #include <F_AntiCheat> to any script where you want to use it.
- Change all your money functions to F_GivePlayerMoney(playerid, amount); F_SetPlayerMoney(playerid, amount) or F_ResetPlayerMoney(playerid)
- Add F_OnInit(); under OnGameModeInit()
- Add F_OnPlayerConnect(playerid); under OnPlayerConnect()


Configuration:
- new AntiCheat = 1; //change to 0 if you want to disable AntiCheat
- #define MAX_DIFFERENCE 200 //maximum difference between the real money of the player, and the (maybe cheated). This can be useful when you didn't disable stunt bonuses.

- If you want to change the result of cheating (set to kick) to ban, than change this line:
Код:
Kick(i);
to
Код:
Ban(i);
Functions:
Код:
F_GivePlayerMoney(playerid, amount);
F_SetPlayerMoney(playerid, amount);
F_ResetPlayerMoney(playerid);
and anti money cheat of course!
How it works:
Let's say that A is the real money of the player (what you see in the upper right of your screen in samp)
and B is the value of money that the script saves.

When a player cheats, they change the value A to ... whatever they want
a cheater can't change the B value with his stupid hacks

So there will be a difference between value A and value B
That difference is what this filerscript detects.
When there is a difference between the 2 values, the player gets kicked/banned
(you can choose that yourself if he'll get kicked or banned)

Why do you need to change all functions from GivePlayerMoney to F_GivePlayerMoney:
When you would use the GivePlayerMoney function, it's impossible for the script to change value B
When you use GivePlayerMoney, the script changes the value B + gives you money (value A)

Credits:
Seif_ for his Seifensive include

Download:




Enjoy :P
Reply
#2

1.


nice script!!
suppose:
change the F_GivePlayerMoney(....)
to stocks then there wont be warnings as "is never used"
Reply
#3

thanks Toad,
I edited it :P
Reply
#4

sry Seif_ i forgot , they're there now xD
Reply
#5

very nice theres multiples of these though but kool
Reply
#6

thanks
Reply
#7

i can't understand this ... lol
Reply
#8

Danut,

It works like this:

Let's say that A is the real money of the player (what you see in the upper right of your screen in samp)
and B is the value of money that the script saves.

When a player cheats, they change the value A to ... whatever they want
a cheater can't change the B value with his stupid hacks

So there will be a difference between value A and value B
That difference is what this filerscript detects.
When there is a difference between the 2 values, the player gets kicked/banned
(you can choose that yourself if he'll get kicked or banned)

Why do you need to change all functions from GivePlayerMoney to F_GivePlayerMoney:
When you would use the GivePlayerMoney function, it's impossible for the script to change value B
When you use GivePlayerMoney, the script changes the value B + gives you money (value A)


I hope you understand it now (and if you don't understand it it'll be because of my bad english xD)



(i put this info in the 1st post to )
Reply
#9

but ppl what about if hackers turn their cheat on from a trainer? like when they spawn they minimize the game and turn the cheat on :/
Reply
#10

Quote:
Originally Posted by silvan
but ppl what about if hackers turn their cheat on from a trainer? like when they spawn they minimize the game and turn the cheat on :/
if they do that, and go back in game, the script will notice a difference between A and B (see previous post) and they will get kicked
Reply
#11

i think i noticed a bug bro :/ but it is a really good fuckin script nice one but i got one bug i think....
it gives the money but the ammount don't appear in the other person's $ the real money.... the original money will remain the same if you give / take can you change that it will be same as the money? for example when it give money it will increase the original number money.... the Green $ ... because for me its remaining 00000... but i can use money which it comes like invisible.....
Reply
#12

errm

so what you want to say is that when you give money (with F_GivePlayerMoney i think/hope?)
than the green $ money doesn't change but the filterscript value is changing? is that what you mean?

if it is, look at your adminscript/gamemode or where ever you put the F_GivePlayerMoney and check if the 1se parameter (playerid) is correct

and what do you mean with: "it comes like invisible"?


edit: I just tested it again and it works fine for me
Reply
#13

bro you forgot that when a person enters a taxi as a driver ( car Model no: 420 ) it give you $12 ... and it kick you for money hack.... can you fix that? maybe if you put something like "

public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 420)
{
F_GivePlayerMoney(playerid,12);
}
}
}


i know that this might fix the problem but.... if you add it, it will be much less buggy

and about the other post i did.... sry the script its good... the server just needed a restart... then it worked fine.... sry again.
Reply
#14

Quote:
Originally Posted by silvan
bro you forgot that when a person enters a taxi as a driver ( car Model no: 420 ) it give you $12 ... and it kick you for money hack.... can you fix that? maybe if you put something like "

public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 420)
{
F_GivePlayerMoney(playerid,12);
}
}
}
that's why you can have a difference of 200$
if you want to get kicked, you'll need to enter that taxi 17 times xD

Quote:
Originally Posted by silvan
i know that this might fix the problem but.... if you add it, it will be much less buggy

and about the other post i did.... sry the script its good... the server just needed a restart... then it worked fine.... sry again.
np
Reply
#15

well why you don't wanna add it in your script? because some hacks can give you money how much you want... and even if they get 12$ with hack server will notice .... and if it take it from taxi....
Reply
#16

and what about stunt bonusses? just disable them than?
i think it's better this wat
or are stunt bonusses also able to be solved?
0.3.0 should have OnPlayerreceiveStuntBones(playerid, money); lol
Reply
#17

i did disabling stunt... but still.... that taxi thing is messing it up :/ i has about 30 taxis in server... if a person enter in all then he will get kicked and if i increase the ammount of difference ppl can hack and get little money ....
Reply
#18

hmm yea I'll need to find a solution for that
Reply
#19

F_AntiCheat.inc

Great work, thought you would want a mirror as sometimes sendspace's servers are full.
Reply
#20

Quote:
Originally Posted by Norn
F_AntiCheat.inc

Great work, thought you would want a mirror as sometimes sendspace's servers are full. :lol:
but there are no enters :P
ps i already have enough mirrors :)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)