SA-MP Forums Archive
[FilterScript] Anti Cheat - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Anti Cheat (/showthread.php?tid=419676)



Anti Cheat - Renchand1998 - 01.03.2013

Hello everybody, i did today script anti cheat. Script have 8 functions.
Код:
GetMoney(PlayerId)
This function return amount of player money.
Код:
GiveMoney(PlayerId,Amount)
This function give money for player.
Код:
SetMoney(PlayerId,Amount)
This function setting player money.
Код:
ResetMoney(PlayerId)
This function reset player money.
Код:
GiveWeapon(PlayerId,WeaponId,Ammunition)
This function give weapon for player.
Код:
ResetWeapon(PlayerId,WeaponId)
This function reset one weapon from player.
Код:
ResetWeapons(PlayerId)
This function reset all player weapons.
Код:
GetWeaponSlot(WeaponId)
This function return a slot from weapon id. But this not all, if player use money hack this his money has been reset. And same with weapon hack. Now also looking for speed hack in players.
Код:
forward AntiCheat(PlayerId,Cheat_Type,WeaponId);
public AntiCheat(PlayerId,Cheat_Type,WeaponId)
{
	if(Cheat_Type == Cheat_Type_Money) SetMoney(PlayerId,Player[PlayerId][PlayerMoney]);
	if(Cheat_Type == Cheat_Type_Weapons) ResetWeapon(PlayerId,WeaponId);
	if(Cheat_Type == Cheat_Type_Player_Speed) SetPlayerHealth(PlayerId,0);
	if(Cheat_Type == Cheat_Type_Vehicle_Speed) DestroyVehicle(GetPlayerVehicleID(PlayerId));
	return 1;
}
You can freely modify it. Download links below.
http://www.solidfiles.com/d/74f1065d3c/
http://pastebin.com/CBAkgB4L


Re: Anti Cheat - Alekseyka - 01.03.2013

working to 0.3x?


Re: Anti Cheat - Renchand1998 - 01.03.2013

Yes i tested it at 0.3x.


Re: Anti Cheat - Alekseyka - 01.03.2013

Nice


Re: Anti Cheat - Krisna - 02.03.2013

good job


Re: Anti Cheat - SeV_ - 02.03.2013

looks nice..


Re: Anti Cheat - Renchand1998 - 02.03.2013

Thanks you all. Update, now also looking for speed hack.


Re: Anti Cheat - YahyaBR - 03.03.2013

wow good job!
very nice


Re: Anti Cheat - NeyMar96 - 03.03.2013

If i took pickup-weapon it's think that is cheats..


Re: Anti Cheat - Renchand1998 - 03.03.2013

You can do pickup weapons with this script.
Код:
#include <a_samp>

new Pickup;

public OnGameModeInit()
{
	Pickup = CreatePickup(339,2,0,0,0,0);
	return 1;
}

public OnPlayerPickUpPickup(playerid,pickupid)
{
	if(Pickup == pickupid) GiveWeapon(playerid,8,1);
	return 1;
}