19.05.2016, 12:45
i have this code for anti health hack but when i type /hackers it says None while my health is 100.
Код:
stock CheckAntiHealth(playerid){ if((AntiHealthHackCD[playerid]+3)<gettime()){ new Float:hp;GetPlayerHealth(playerid,hp); if(hp==100&&IsPlayerInASK[playerid]==false&&AdminDuty[playerid]==false){ IsPlayerHacker[playerid]=true; AntiHealthHackCD[playerid]=gettime();} else IsPlayerHacker[playerid]=false;} return 1;}
Код:
CMD:hackers(playerid,params[]){ #pragma unused params if(!CheckCmdStatus("hackers"))return SendClientMessage(playerid,COLOR_RED,"This command is disabled."); if(!CheckAdminPerm(playerid,1))return SendClientMessage(playerid,COLOR_RED,"You are not authorized to use this command."); new count=0; SendClientMessage(playerid,COLOR_BLUE,"Hackers List:"); foreach(Player,i){ if(IsPlayerHacker[i]==true){ new Float:hp;GetPlayerHealth(i,hp); new Float:ar;GetPlayerArmour(i,ar); SendClientMessageEx(playerid,COLOR_WHITE," %s(%d) - Health:%.1f - Armour:%.1f",PlayerName(i),i,hp,ar); count++;}} if(count==0)SendClientMessage(playerid,COLOR_WHITE," None."); return 1;}