SA-MP Forums Archive
Anti HP / Armour Cheats.. - 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: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Anti HP / Armour Cheats.. (/showthread.php?tid=278151)



Anti HP / Armour Cheats.. - Machida - 21.08.2011

Well i made this:

Код:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
	new Float:AC; GetPlayerArmour(Target,AC);
	new Float:HP; GetPlayerHealth(Target,HP);
	new PNAME[126]; GetPlayerName(Target,PNAME,sizeof(PNAME));
	
	if(AC){
	    if(!ArmourLost){
	        new KICKED[256]; 
	        format(KICKED,sizeof(KICKED),"%s has been kicked from server.(Reason: Cheats )",PNAME);
	        SendClientMessageToAll(COLOR_RED,KICKED);
			Kick(Target);
		}
	} else if(HP){
	
		if(!HealthLost){
  			new KICKED[256];
     		format(KICKED,sizeof(KICKED),"%s has been kicked from server.(Reason: Cheats )",PNAME);
      		SendClientMessageToAll(COLOR_RED,KICKED);
			Kick(Target);
		}
	
	}
    return 1;
}
Its like an anti-cheat for health / armour..(Didn tested)
If i shoot a lagger and doesnt make any effect in his HP or Armour will the player get kicked?
Cause i dont know that callback very mutch , that i downloaded in the other section...


Re: Anti HP / Armour Cheats.. - [HiC]TheKiller - 21.08.2011

126 cells for a player name and 256 cells for a small string? Firstly, fix your string sizes. I'm pretty sure that it detects if you shoot the players position according to the server, not the players actual position on your screen.


Re: Anti HP / Armour Cheats.. - Machida - 21.08.2011

About the strings, I dont know what is the max cells for each one, so i did it with high values.

So that will work right? (Not the code (i didn tested ), but the way i wanna do it )


Re: Anti HP / Armour Cheats.. - cessil - 21.08.2011

no it will not, you are not taking into consideration lag