AntiCheat by Luk0r << Bugged?
#1

Код:
public GlobalHackCheck()
{
	new curHour, curMinute, curSecond;
	new string[256], banip[16], plname[64];
	new weaponid, ammo;
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
	  if(IsPlayerConnected(i) && PlayerInfo[i][pAdmin] < 1)
	  {
			gettime(curHour, curMinute, curSecond);
			if (ScriptMoneyUpdated[i]+2 < curSecond && saferaha[i] == 0)
			{
				new plactualmoney = GetPlayerMoney(i);
				if (plactualmoney > ScriptMoney[i] && plactualmoney-999 > ScriptMoney[i])
				{
					GetPlayerName(i, plname, sizeof(plname));
					TogglePlayerControllable(i, 0);
					PlayerInfo[i][pLocked] = 1;
					OnPlayerUpdate(i);
					GetPlayerIp(i, banip, sizeof(banip));
					new spawnedamount = plactualmoney-ScriptMoney[i];
					format(string, sizeof(string), "[ADM] %s on bдnnitud DUCK poolt. Pхhjus: Rahahack. [%d.-]", plname, spawnedamount);
					BanLog(string);
					ScriptMoney[i] = 0;
					ScriptMoneyUpdated[i] = 0;
					SendClientMessageToAll(COLOR_LIGHTRED, string);
					Kick(i);
					saferaha[i] = 0;
				}
				else
				{
					ScriptMoney[i] = plactualmoney;
					ScriptMoneyUpdated[i] = 0;
					saferaha[i] = 0;
				}
			}
			GetPlayerWeaponData(i, 7, weaponid, ammo);
			new pSpecialAction = GetPlayerSpecialAction(i);
			if (weaponid > 1 || pSpecialAction == SPECIAL_ACTION_USEJETPACK)
			{
				// Illegal weapon
				TogglePlayerControllable(i, 0);
				SendClientMessage(i, COLOR_LIGHTRED, "Anticheat: You have been banned due to suspected cheating.");
				SendClientMessage(i, COLOR_LIGHTRED, "Anticheat: Please contact an admin on ventrilo or on the forum immediately if you feel this is in error.");
				SendClientMessage(i, COLOR_RED, "DUCK Anticheat 1.5 by Luk0r (Edited by Ellis/Scorcher)");
				//PlayerInfo[i][pLocked] = 1;
				OnPlayerUpdate(i);
				//GetPlayerIp(i, banip, sizeof(banip));
				//BanAdd(4, PlayerInfo[i][pSQLID], banip, 38);
				GetPlayerName(i, plname, sizeof(plname));
				format(string, sizeof(string), "[ADM] %s on bдnnitud DUCK poolt. Pхhjus: Relvadehack.", plname);
				SendClientMessageToAll(COLOR_LIGHTRED, string);
				Ban(i);
				saferaha[i] = 0;
			}
		}
	}
}
Without:
saferaha
Then:
2 players: 1 player paying to 2 player ($4000), then locked by DUCK. (MoneyCheat $4000)
1 player: /v park ($1500), then locked by DUCK. (MoneyCheat $1500)

So i got idea to make it "saferaha"
Then:
2 players: 1 player paying to 2 player ($4000), and marked to safe money.
1 player: /v park ($1500), and marked to safe money.

If Duck see safe money, then don't lock it.

I putted saferaha into anticheat, now tested. One guy was joining, i checked him stats: $0, after $40000, and i banned him. But Duck didn't locked him.

How i can fix that? :S

Like: /pay got "saferaha[playerid] = 1;"

Too OnPlayerConnect there's: "saferaha[playerid] = 0;"
Reply
#2

Maybe report the bug in its topic...
Reply
#3

Quote:
Originally Posted by ikarus❶❸❸❼
Maybe report the bug in its topic...
Ok, i do then.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)