Cheaters decreasing money
#1

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

Ban him

Also make sure that you can not use negative money in /givecash or some similar cmds
Reply
#3

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);
}
Reply
#4

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

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

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

Arent serials meant to be unique ?
Reply
#8

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


Forum Jump:


Users browsing this thread: 1 Guest(s)