07.07.2013, 23:34
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
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
You are Done , Next Part i will tell you how to add Exception for simple Resturant.
Result
P.S : idk if someone made this or not already but i made all of this by myself , thanks for reading
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.
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
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;
}