Anti Cheat
#12

Код:
forward WeaponTimer();
public WeaponTimer()
{
	new string[256], str1[256], str2[256], str3[256];
	new username[MAX_PLAYER_NAME];
	for(new i=0; i<MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
		    for(new w = 0; w < 13; w++)
		    {
  				new tweap, tammo;
  				GetPlayerWeaponData(i, w ,tweap ,tammo);
  				format(str1,sizeof(str1),"wslot%d",w);
  				format(str2,sizeof(str2),"weap%d",tweap);
				if(GetPVarInt(i,str2) != 1 && tweap != 0)// I've changed THIS line!
				{
					GetPlayerName(i,username,sizeof(username));
					format(string, 256, "AdmWarning: [%d]%s just try to spawn a weapon",i,username);
					ABroadCast(COLOR_LIGHTRED,string,1);
					Kick(i);
				}
			}
		}
	}
}
I've changed just one line, it has been commented!
Just let me know if this works out for you though
(I don't know about the rest of you, but this code blew my mind, maybe I should've waken up completely first...)

Also: You should continue to use PVars where ever possible, it's much easier & more effective
Reply


Messages In This Thread
Anti Cheat - by _ReloadeD_ - 10.08.2011, 09:59
Re: Anti Cheat - by Lorenc_ - 10.08.2011, 10:08
Re: Anti Cheat - by _ReloadeD_ - 10.08.2011, 10:11
Re: Anti Cheat - by _ReloadeD_ - 10.08.2011, 10:39
Re: Anti Cheat - by Riddick94 - 10.08.2011, 10:41
Re: Anti Cheat - by _ReloadeD_ - 10.08.2011, 10:52
Re: Anti Cheat - by Riddick94 - 10.08.2011, 11:11
Re: Anti Cheat - by MadeMan - 10.08.2011, 12:03
Re: Anti Cheat - by _ReloadeD_ - 10.08.2011, 19:57
Re: Anti Cheat - by _ReloadeD_ - 10.08.2011, 21:35
Re: Anti Cheat - by _ReloadeD_ - 11.08.2011, 10:15
Re: Anti Cheat - by XGh0stz - 11.08.2011, 10:50

Forum Jump:


Users browsing this thread: 1 Guest(s)