14.08.2012, 09:31
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?
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");
}
if(GetPlayerMoney(playerid) != GetServerMoney(playerid))
{
Kick(playerid);
}
By the way, I banned him many times, but he's got a dynamic IP, so he keeps connecting...
|
native gpci (playerid, serial [], len);
new serial[128];
gpci(playerid,playerserial,sizeof(playerserial));