minigun
#6

You are sending playerid and then scanning all players


Put this at the Top somewhere
Code:
new weaponhacktimer;
Put this under OnGameModeInit()

Code:
weaponhacktimer = SetTimer("WeaponHack", 1000, true);
Code:
forward WeaponHack();
public WeaponHack()
{

	
	new string[128];
	new w7;
	new a7;
	new day,month,year,hour,minute;
	new ip[256];
	for(new j=0; j < MAX_PLAYERS; j++)
	{
             if(IsPlayerAdmin(j) || PlayerInfo[j][pAdmin] > 0) return 0;
          for(new i=0;i<13,i++)
          {
		GetPlayerWeaponData(j, i, w7, a7);
		if(w7 == 38 && a7 >= 1)
		{
			GetPlayerIp(j,ip,sizeof(ip));
			getdate(year,month,day);
			gettime(hour,minute);
			format(string, sizeof(string), "%s was banned from the server. [Reason: Minigun]", PlayerName(playerid));
			SendClientMessageToAll(_COLOR_RED, string);
			SendClientMessage(j,_COLOR_RED," ");
			SendClientMessage(j,_COLOR_RED," ");
			SendClientMessage(j,_COLOR_RED,"You was banned from this server!");
			SendClientMessage(j,_COLOR_WHITE,"Reason: Minigun");
			SendClientMessage(j,_COLOR_WHITE,"Admin: Anti-Cheat");
			format(string2, sizeof(string2), "Date: %d/%d/%d",day,month,year);
			SendClientMessage(j,_COLOR_WHITE,string);
			if (minute <= 9)
			{
				format(string,25,"Time: %d:0%d",hour,minute);
				SendClientMessage(j,_COLOR_WHITE,string);
			}
			else
			{
				format(string,25,"Time: %d:%d",hour,minute);
				SendClientMessage(j,_COLOR_WHITE,string);
			}
			format(string, sizeof(string), "IP: %s",ip);
			SendClientMessage(j,_COLOR_WHITE,string;
			if(LoggedIn[j] == 1) dUserSetINT(PlayerName(playerid)).("Banned",1);
			WriteBanToFile(j, "Anti-Cheat", "Minigun");
			BanEx(j,"Minigun");
			
		}
	}
     }
	return 1;
}
Reply


Messages In This Thread
minigun - by Headshot1108 - 15.06.2010, 10:13
Re: minigun - by Naxix - 15.06.2010, 10:20
Re: minigun - by Headshot1108 - 15.06.2010, 10:30
Re: minigun - by whitedragon - 15.06.2010, 10:36
Re: minigun - by Headshot1108 - 15.06.2010, 10:37
Re: minigun - by DJDhan - 15.06.2010, 11:02
Re: minigun - by Headshot1108 - 15.06.2010, 11:23
Re: minigun - by DJDhan - 15.06.2010, 11:29
Re: minigun - by Headshot1108 - 15.06.2010, 11:30

Forum Jump:


Users browsing this thread: 2 Guest(s)