Anti HP / Armour Cheats..
#1

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...
Reply
#2

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.
Reply
#3

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 )
Reply
#4

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


Forum Jump:


Users browsing this thread: 1 Guest(s)