Creating Simple Anti Health/Armour Hacks -
hossa - 07.07.2013
Hello everyone , this is my Tuorial about how to create a simple Anti Health / Armour hack , iam newbie at scripting but iam sure this is working as i tested it
Now Follow me :
- First of All , when they players Spawn use This
pawn Code:
public OnPlayerSpawn(playerid)
{
SetPlayerArmour(playerid, 95);
SetPlayerHealth(playerid, 95);
return 1;
}
// Now you have set Max. HP(Health Points) and AP(Armour Points) when the player spawns.
Everything should go clean without any Bugs or errors if you got a working a_samp include.
Now we will use OnPlayerUpdate in 2 small functions
pawn Code:
public OnPlayerUpdate(playerid)
{
new Float:pHealth;
GetPlayerHealth(playerid, pHealth);
if(pHealth >= 96)
{
SendClientMessage(playerid, -1, "{FF0000} You Got Banned for Health Hacking [ HP Exceeded 95 ]");
Ban(playerid);
}
new Float:pArmour;
GetPlayerArmour(playerid, pArmour);
if(pArmour >= 96)
{
SendClientMessage(playerid, -1, "{FF0000} You Got Banned for Armour Hacking [ AP Exceeded 95 ]);
Ban(playerid);
}
return 1;
}
// Now if the player's armour/health increases and become equal or more than 96 , The player gets Auto Banned
You are Done , Next Part i will tell you how to add Exception for simple Resturant.
Result
pawn Code:
public OnPlayerSpawn(playerid)
{
SetPlayerArmour(playerid, 95);
SetPlayerHealth(playerid, 95);
return 1;
}
public OnPlayerUpdate(playerid)
{
new Float:pHealth;
GetPlayerHealth(playerid, pHealth);
if(pHealth >= 96)
{
SendClientMessage(playerid, -1, "{FF0000} You Got Banned for Health Hacking [ HP Exceeded 95 ]");
Ban(playerid);
}
new Float:pArmour;
GetPlayerArmour(playerid, pArmour);
if(pArmour >= 96)
{
SendClientMessage(playerid, -1, "{FF0000} You Got Banned for Armour Hacking [ AP Exceeded 95 ]);
Ban(playerid);
}
return 1;
}
P.S : idk if someone made this or not already but i made all of this by myself , thanks for reading
Re: Creating Simple Anti Health/Armour Hacks -
Smokkr - 07.07.2013
Hmm, simple and nice tutorial.But what will happen if an admin give you 100 health and 100 armour?Try to set immune for a player which health/armour is given by admin.
Re: Creating Simple Anti Health/Armour Hacks - HuSs3n - 07.07.2013
Quote:
Originally Posted by Smokkr
But what will happen if an admin give you 100 health and 100 armour?
|
or if players use Vending Machines
Re: Creating Simple Anti Health/Armour Hacks -
hossa - 07.07.2013
Quote:
Originally Posted by Smokkr
Hmm, simple and nice tutorial.But what will happen if an admin give you 100 health and 100 armour?Try to set immune for a player which health/armour is given by admin.
|
well you have to set your Max. Healh in /sethealth to 95 not any more to avoid that.
also to the armour.
everything could be done via the script.
and i can add simple Exception incase player is admin.
AW: Creating Simple Anti Health/Armour Hacks -
BigETI - 08.07.2013
You should take a look at this one:
https://sampforum.blast.hk/showthread.php?tid=220089
Re: Creating Simple Anti Health/Armour Hacks -
hossa - 08.07.2013
First time to read it.
Re: AW: Creating Simple Anti Health/Armour Hacks -
Passout - 08.07.2013
Quote:
Originally Posted by BigETI
|
THANK YOU@!!!!!!!!!!!!!!!!!!!!!!!
Re: Creating Simple Anti Health/Armour Hacks -
Cjgogo - 08.07.2013
It's much better to use timers for Anti-Cheat systems, much more efficient than OnPlayerUpdate. HOWEVER, yeah, it's a nice basic tutorial for beginners.
Re: Creating Simple Anti Health/Armour Hacks -
hossa - 08.07.2013
really this is my first Tutorial and the scripts i made isn't very advanced.
thanks
Re: Creating Simple Anti Health/Armour Hacks -
Makhmoor - 03.05.2015
Great its work on my server Thanks