Money hacker problems -
thimo - 25.07.2013
Okay im experiencing a severe money hacker problem. However i AM using the server sided money but they are still getting trough... How in the chicken can they do that?
Re: Money hacker problems -
papedo - 25.07.2013
You canґt stop cheaters they will cheat money.. You can just detect it..
Your problem could be bug in anti money cheat. Players on my server tried to cheat money and save them into bank account before anticheat will check it.
You only need to add money checks before player try to use money and it will be ok.
Re: Money hacker problems -
thimo - 25.07.2013
It gets updated every second and i do not have a bank system
Re: Money hacker problems -
papedo - 25.07.2013
What antimoney cheat R U using? Please post your code.
Re: Money hacker problems -
Jochemd - 25.07.2013
You should use a serversided array when retrieving how much cash the player has (like PVar "Cash"), and evade using GetPlayerMoney.
Re: Money hacker problems -
thimo - 25.07.2013
Im using serversided money and using the variable
that is a serversided array right? Also I still need to check the GetPlayeeMoney thing but i cant now im on my ipod
Re: Money hacker problems -
papedo - 25.07.2013
I use GetPlayerMoney only for anticheat... and when player have different money than he should have i setPlayerMoney to the right value.. But in user file i save money from Money[playerid]..
Right usage; Example: m4 command
pawn Код:
if(!strcmp(cmdtext, "/m4", true)){
if(Money[playerid] < 5000)return SendClientMessage(playerid, 0x00FFFFAA, "* {FFFFFF}You donґt have enough money!");
GivePlayerWeapon(playerid, 31, 500);
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, Money[playerid]-5000);
return 1;
}
Re: Money hacker problems -
thimo - 25.07.2013
Thats what im doing aswell but with some stocks but as i said idk if theres getplayermoney being used where its sbouldnt be
Re: Money hacker problems -
tyler12 - 25.07.2013
How do you detect if they have money hacked?
You should have something like
if(GetPlayerMoney(playerid) > cash[playerid])
Re: Money hacker problems -
Konstantinos - 26.07.2013
Quote:
Originally Posted by papedo
You canґt stop cheaters they will cheat money.. You can just detect it..
|
Oh, yeah! You can stop them from using money cheats. I use a server-side money and they cannot use their "fake" money.
pawn Код:
// Global
new
Real_Money[ MAX_PLAYERS ]
;
// OnPlayerConnect
Real_Money[ playerid ] = 0;
stock GetUserMoney( playerid ) return Real_Money[ playerid ];
stock GiveUserMoney( playerid, money )
{
Real_Money[ playerid ] += money;
ResetPlayerMoney( playerid );
GivePlayerMoney( playerid, Real_Money[ playerid ] );
}
stock ResetUserMoney( playerid )
{
Real_Money[ playerid ] = 0;
ResetPlayerMoney( playerid );
}
stock SetUserMoney( playerid, money )
{
Real_Money[ playerid ] = money;
ResetPlayerMoney( playerid );
GivePlayerMoney( playerid, Real_Money[ playerid ] );
}
// Timer's callback
forward OnServerCheckMoney( );
public OnServerCheckMoney( )
{
new
money
;
foreach(new playerid : Player)
{
money = GetPlayerMoney( playerid );
if( money < Real_Money[ playerid ] && money > -1 ) Real_Money[ playerid ] = money; // if they lost money from client side (burger shops, ammunation, casino, pay n spray etc
if( GetUserMoney( playerid ) < 0 ) Real_Money[ playerid ] = 0; // i don't want less than 0
else if( GetUserMoney( playerid ) > 999999999 ) Real_Money[ playerid ] = 999999999; // and more than 999,999,999
ResetPlayerMoney( playerid );
GivePlayerMoney( playerid, Real_Money[ playerid ] );
}
}
And when they login, give or set their money with the functions above.