[Include] Advanced Server Side Health/Armour - 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)
+---- Forum: Includes (
https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] Advanced Server Side Health/Armour (
/showthread.php?tid=505585)
Advanced Server Side Health/Armour -
VSM - 09.04.2014
ADVANCED SERVER SIDE HEALTH/ARMOUR
INTRODUCTION
Hi there once again, this is my second release and this time, it's an include. After spending time thinking about creating a server side anti health/armour hack other than setting the variables to 99.0 which seemed stupid, I came up with this little efficient idea to effectively spot players who are using health/armour hacks.
P.S - I haven't tested this include yet, please test it and see how it works. Thank you. However, I've tested the logic of this hack in a friend's server and it works perfectly.
INSTRUCTIONS
Step 1: Place the ssha.inc file in your pawno/includes directory.
Step 2: In your main GameMode, insert #include <ssha> at the top.
Step 3: CTRL + H and replace all the SetPlayerHealth and SetPlayerArmour with szSetPlayerHealth and szSetPlayerArmour.
Step 4: Add this to code to your GameMode (you may modify it to suit your needs):
pawn Code:
public OnPlayerHack(playerid, hackid, newamount, oldamount)
{
new string[128];
switch(hackid)
{
case PLAYER_HEALTH_HACK:
{
format(string, sizeof(string), "{FF6347}Warning:{FFFF00} (ID: %d) %s may be health hacking, %f health was found while they have %f.", playerid, szGetPlayerName(playerid), newamount, oldamount);
SendClientMessageToAll(0, string);
}
case PLAYER_ARMOUR_HACK:
{
format(string, sizeof(string), "{FF6347}Warning:{FFFF00} (ID: %d) %s may be armour hacking, %f armour was found while they have %f.", playerid, szGetPlayerName(playerid), newamount, oldamount);
SendClientMessageToAll(0, string);
}
}
return 1;
}
DOWNLOADS
Live Code #1 - Pastebin
CREDITS
This code was written entirely by me and I worked on it for around 3 hours. There may be bugs. Feel free to report it here and I'll get my friend to actively reply on the thread.
If you're using the code for commercial purposes or if you're editing the script and re-releasing it out to the public, please inform me.

Copyright ©2014, VSM
Imperious Roleplay by VSM is licensed under a
Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
Re: Advanced Server Side Health/Armour -
ChuckyBabe - 09.04.2014
Thanks for this men !
Re: Advanced Server Side Health/Armour -
Norrin - 09.04.2014
Great job. I'll be doing the public relations task.
Re: Advanced Server Side Health/Armour -
Theadamedge - 09.04.2014
deleted
Re: Advanced Server Side Health/Armour -
VenomMancer - 09.04.2014
This works good ?
Re: Advanced Server Side Health/Armour -
Micheal123 - 09.04.2014
Thanks
Re: Advanced Server Side Health/Armour -
Pottus - 09.04.2014
I think you would be better off making a skinhit system since lagcomp isn't very reliable and also health cheats will do absolutely nothing.
Re: Advanced Server Side Health/Armour -
Jochemd - 09.04.2014
You shouldn't post untested code, never.
Re: Advanced Server Side Health/Armour -
Norrin - 09.04.2014
It works. Tested.
Quote:
Originally Posted by [uL]Pottus
I think you would be better off making a skinhit system since lagcomp isn't very reliable and also health cheats will do absolutely nothing.
|
It is. It works nonetheless. LOL.
Re: Advanced Server Side Health/Armour -
Norrin - 09.04.2014
-sorry for double post, honest mistake-