new Float:Hp; GetPlayerHealth( playerid, Hp ); if(IsSpawned[playerid] != 0 && Hp >= 100) { new string[128]; format(string,sizeof(string),"%s(%d) is health hacking.",PlayerName(playerid),playerid); SendClientMessageToAll(1,string); }
public OnPlayerSpawn(playerid)
{
SetPlayerArmour(playerid, 99);
SetPlayerHealth(playerid, 99);
return 1;
}
public OnPlayerUpdate(playerid)
{
new Float:pHealth;
GetPlayerHealth(playerid, pHealth);
if(pHealth > 99)
{
SendClientMessage(playerid, -1, "{FF0000} You Got Banned for Health Hacking [ HP Exceeded 99 ]");
Ban(playerid);
}
new Float:pArmour;
GetPlayerArmour(playerid, pArmour);
if(pArmour > 99)
{
SendClientMessage(playerid, -1, "{FF0000} You Got Banned for Armour Hacking [ AP Exceeded 99 ]");
Ban(playerid);
}
return 1;
}
new Float:Hp; GetPlayerHealth( playerid, Hp ); if(IsSpawned[playerid] != 0 && Hp > 99) { new string[128]; format(string,sizeof(string),"%s(%d) is health hacking.",PlayerName(playerid),playerid); SendClientMessageToAll(1,string); }
Maybe the problem was in HP >= 100 I changed it but same stuff
Код:
new Float:Hp; GetPlayerHealth( playerid, Hp ); if(IsSpawned[playerid] != 0 && Hp > 99) { new string[128]; format(string,sizeof(string),"%s(%d) is health hacking.",PlayerName(playerid),playerid); SendClientMessageToAll(1,string); } |