Anti Cheat
#1

I trying to make a weapon anticheat but i have a little problem....
If I use the new fuction to give someone a weapon it also give me a kick....
help please
this is my script:
Код:
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,str1) != tweap)
				{
					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);
				}
			}
		}
	}
}
Код:
stock YAN_GiveWeapon(playerid,weapon,ammo)
{
	new str[10];
	format(str,sizeof(str),"weap%d",weapon); 
	SetPVarInt(playerid,str,1); 
	format(str,sizeof(str),"wslot%d",GetWeaponSlot(weapon)); 
	SetPVarInt(playerid,str,weapon);
	GivePlayerWeapon(playerid,weapon,ammo);
}
plese a little help guys!
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: 2 Guest(s)