Cheaters decreasing money -
CONTROLA - 14.08.2012
Hey guys, a cheater is always joining my server and somehow, he can decrease other players' money and gets all the money to him. How can I stop this? What's happening?
Re: Cheaters decreasing money -
[MM]RoXoR[FS] - 14.08.2012
Ban him
Also make sure that you can not use negative money in /givecash or some similar cmds
Re: Cheaters decreasing money -
lamarr007 - 14.08.2012
Use server-sided money
pawn Код:
stock GiveServerMoney(playerid, amount)
{
SetPVarInt(playerid, "Money", GetPVarInt(playerid, "Money") + amount);
SetPlayerMoney(playerid, GetPlayerMoney(playerid) + amount);
}
stock SetServerMoney(playerid, amount)
{
SetPVarInt(playerid, "Money", amount);
SetPlayerMoney(playerid, amount);
}
stock ResetServerMoney(playerid)
{
ResetPlayerMoney(playerid);
SetPVarInt(playerid, "Money", 0);
}
stock GetServerMoney(playerid)
{
return GetPVarInt(playerid, "Money");
}
Then you can check it in
OnPlayerUpdate
pawn Код:
if(GetPlayerMoney(playerid) != GetServerMoney(playerid))
{
Kick(playerid);
}
Re: Cheaters decreasing money -
CONTROLA - 14.08.2012
Well, I am actually using serverside money. What I observed is that when he tries to "steal" all the players' money he doesn't get any, but people still have their money decreased.
By the way, I banned him many times, but he's got a dynamic IP, so he keeps connecting...
Re: Cheaters decreasing money -
[MM]RoXoR[FS] - 14.08.2012
Quote:
Originally Posted by CONTROLA
By the way, I banned him many times, but he's got a dynamic IP, so he keeps connecting...
|
Use gpci native to ban him
pawn Код:
native gpci (playerid, serial [], len);
new serial[128];
gpci(playerid,playerserial,sizeof(playerserial));
And store it somewhere in his .ini file maybe.
When he connect, verify his serial by using gpci and if it is same, ban him.
Re: Cheaters decreasing money -
CONTROLA - 14.08.2012
Well, if I'm using the gpci native aren't there any chances for a player to get innocently kicked for having the same serial as the banned player?
Re: Cheaters decreasing money -
[MM]RoXoR[FS] - 14.08.2012
Arent serials meant to be unique ?
Re: Cheaters decreasing money -
CONTROLA - 14.08.2012
Ok thanks a lot, i'll try to store all the banned serials in an ini file and check in OnPlayerConnect if the player's serial is one of those in the ini file.
Thank you, the topic can be closed.