SA-MP Forums Archive
Anticheat spam? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Anticheat spam? (/showthread.php?tid=597116)



Anticheat spam? - Sebz - 26.12.2015

Whenever a player spawns, admins are spammed extremely fast that the player is hacking their deagle they spawned with. Any ideas as to what is causing this?

Код:
	if(IsPlayerConnected(playerid))
	{
		new weapons[13][2];
		for (new i = 0; i <= 12; i++)
		{
			GetPlayerWeaponData(playerid, i, weapons[i][0], weapons[i][1]);
		}

		for (new i = 0; i <= 12; i++)
		{
			if(!PlayerHasWeapon(playerid, weapons[i][0]))
			{
			    new string[128];
			    new name[24];
			    GetPlayerName(playerid, name, sizeof(name));
                format(string, sizeof(string), "%s[ID:%d] has possibly hacked weapon [%d].", name, playerid, weapons[i][0]);
				SendToAdmins(COLOR_ORANGE, string);
			}
			else if(PlayerHasWeapon(playerid, weapons[i][0]))
			{
				if(weapons[i][1] > Player[playerid][WeaponAmmo][weapons[i][0]] || weapons[i][1] < Player[playerid][WeaponAmmo][weapons[i][0]])
				{
				    new string[128];
				    new name[24];
				    GetPlayerName(playerid, name, sizeof(name));
	                format(string, sizeof(string), "%s[ID:%d] must have %d ammo but has %d in his [%d].", name, playerid, Player[playerid][WeaponAmmo][weapons[i][0]], weapons[i][1], weapons[i][0]);
					SendToAdmins(COLOR_ORANGE, string);
				}
			}
		}
	}