05.10.2013, 18:57
Hello, I am looking for protection against armor and hp cheater Where can I find something like this??
SetPlayerHealth(playerid,99);
public OnPlayerUpdate(playerid)
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.
}
pawn Код:
|
if (health > 99.0) // < = less than. > = greater than.
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;
}