07.12.2014, 18:17
Hello i've been working on a anti cheat for health detection if the health does over 99 it sends a msg to admins:
But I don't know if i have written it right, could you please take a look and point out what i've done wrong and where to put stuff! thank you!
pawn Код:
forward HealthTimer();
public HealthTimer()
{
new username[MAX_PLAYER_NAME];
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(GetPlayerHealth(playerid, 100))
{
new string[253], playerid;
GetPlayerName(i,username,sizeof(username));
format(string, sizeof(string), "(AntiCheat): %s (%d): Has been detected for health hacks", username, playerid);
SendMessageToAdmins(red,string);
hInfo[playerid][HealthHackWarn] += 1;
}
}
}
}