The protection of HP and armor -
EmpireSk - 05.10.2013
Hello, I am looking for protection against armor and hp cheater Where can I find something like this??
Re: The protection of HP and armor -
TonyII - 05.10.2013
You can make 100 armor a restricted amount of armor in your server and like make 99 armor the maximum amount, then set a timer that checks every player for 100 armor and if it's 100 you can ban him.
Re: The protection of HP and armor -
EmpireSk - 05.10.2013
knows when someone add a vest so he removes it and the same with hp and when you have the protection and the vest and not take hp
Re: The protection of HP and armor -
SilentSoul - 05.10.2013
Hey, you can detect that player hacking hp by this way..
Set the main health when player spawn to 99
pawn Код:
SetPlayerHealth(playerid,99);
Most of hacks like ****** when player try to restore his hp set his hp to 100 so ..
pawn Код:
public OnPlayerUpdate(playerid)
pawn Код:
new Float:health;
GetPlayerHealth(playerid,health); //check the player health when he use any kind of hacks
if (health < 99.0)
{
new string[126]; // define string
format(string,sizeof(string),"%s try to restore his hp",playerid); //format the string
SendClientMessageToAll(-1,string); //you can change this to send client message to your admins its up to you.
}
The only problem is if player use vending machine or something so you can delete from your map
hope it was helpfull , also check this awesome tutorail :
forum.sa-mp.com/showthread.php?t=220089
Re: The protection of HP and armor -
Steven82 - 06.10.2013
Quote:
Originally Posted by SilentSoul
pawn Код:
new Float:health; GetPlayerHealth(playerid,health); //check the player health when he use any kind of hacks if (health < 99.0) { new string[126]; // define string format(string,sizeof(string),"%s try to restore his hp",playerid); //format the string SendClientMessageToAll(-1,string); //you can change this to send client message to your admins its up to you. }
|
You put the wrong carrot.
pawn Код:
if (health > 99.0) // < = less than. > = greater than.
Re: The protection of HP and armor -
xganyx - 06.10.2013
something like this?
pawn Код:
forward ProtectionFinished(playerid);
public OnPlayerSpawn(playerid)
{
SetPlayerHealth(playerid,100000.000);
SetPlayerArmour(playerid,100000.000);
SetTimer("ProtectionFinished",3000,true);
return 1;
}
public ProtectionFinished(playerid)
{
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
return 1;
}
Re: The protection of HP and armor -
EmpireSk - 06.10.2013
But when a player can make HP through SetPlayerHealth so it's da to 0 when you will be adding info via ****** but when the mode I have SetPlayerHealthEx so I will not give it to 0