[FilterScript] [FS] Antibug "+C"
#1

Here my way of struggle against users of bugs "+ crouch"
(sorry for my bad English)

Код:
#include <a_samp>

#define RELEASED(%0) \
	(((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
	
new PlayerUsingBug[MAX_PLAYERS];
new PlayerBugTimer[MAX_PLAYERS];

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(IsBugWeapon(playerid) && RELEASED(KEY_FIRE)){
 		PlayerUsingBug[playerid] = 1;
		PlayerBugTimer[playerid] = SetTimerEx("BugTimeOut",1000,0,"i",playerid);
	}
	if(PlayerUsingBug[playerid]==1 && newkeys != KEY_FIRE && newkeys & KEY_CROUCH){
		ApplyAnimation(playerid,"PED","getup",4.1,0,0,0,0,0);
	 	PlayerUsingBug[playerid] = 0;
		KillTimer(PlayerBugTimer[playerid]);
	}
	return true;
}

stock BugTimeOut(playerid)
{
	PlayerBugged[playerid]=0;
}

stock IsBugWeapon(playerid)
{
  new weaponid = GetPlayerWeapon(playerid);
  switch(weaponid){
		case 24,25,27,34: return true;}
  return false;
}
Reply


Messages In This Thread
[FS] Antibug "+C" - by Fraer - 30.12.2009, 16:35
Re: [FS] Antibug "+C" - by Grim_ - 30.12.2009, 16:39
Re: [FS] Antibug "+C" - by Sergei - 30.12.2009, 16:43
Re: [FS] Antibug "+C" - by [JIeXa] - 30.12.2009, 18:05
Re: [FS] Antibug "+C" - by HydraX - 30.12.2009, 18:10
Re: [FS] Antibug "+C" - by WackoX - 30.12.2009, 18:24
Re: [FS] Antibug "+C" - by Skaty - 30.12.2009, 19:30
Re: [FS] Antibug "+C" - by ObScUR3_ - 30.12.2009, 19:42
Re: [FS] Antibug "+C" - by wolfcock - 09.07.2010, 17:05
Re: [FS] Antibug "+C" - by Lorenc_ - 10.07.2010, 07:33

Forum Jump:


Users browsing this thread: 3 Guest(s)