new TotalDeaths[MAX_PLAYERS];
new LastDeath[MAX_PLAYERS];
if(TotalDeths[playerid] == 0)
{
LastDeath[playerid] = gettime();
}
TotalDeths[playerid]++;
if(TotalDeths[playerid] == 5) //Number of maxium deaths at same time
{
if((gettime() - LastDeath[playerid]) <= 5)
{
new name[MAX_PLAYER_NAME],string[190],string2[190];
GetPlayerName(playerid, name, sizeof(name));
new Year, Month, Day, Hour, Minute, Second;
getdate(Year, Month, Day);
gettime(Hour, Minute, Second);
format(string,sizeof(string),"You have been banned by AntiCheat for Fake Kills. - %02d/%02d/%d - %02d:%02d:%02d",Day,Month,Year,Hour,Minute,Second);
SendClientMessage(playerid,red,string);
format(string2, sizeof(string), "AC: %s has been banned for Fake Kills. - %02d/%02d/%d - %02d:%02d:%02d",name,reason,Day,Month,Year,Hour,Minute,Second);
SendClientMessageToAll(red,string2);
BanEx(playerid,string2);
}
else
if((gettime() - LastDeath[playerid]) > 5)
{
TotalDeths[playerid]=0;
}
}
(3587) : error 017: undefined symbol "TotalDeths" (3587) : warning 215: expression has no effect (3587) : error 001: expected token: ";", but found "]" (3587) : error 029: invalid expression, assumed zero (3587) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. |
TotalDeaths[playerid]++;
TotalDeaths[playerid]++;
if(TotalDeaths[playerid] == 0)
{
LastDeath[playerid] = gettime();
}
TotalDeaths[playerid]++;
if(TotalDeaths[playerid] == 5) //Number of maxium deaths at same time
{
if((gettime() - LastDeath[playerid]) <= 5)
{
new name[MAX_PLAYER_NAME],string[190],string2[190];
GetPlayerName(playerid, name, sizeof(name));
new Year, Month, Day, Hour, Minute, Second;
getdate(Year, Month, Day);
gettime(Hour, Minute, Second);
format(string,sizeof(string),"You have been banned by AntiCheat for Fake Kills. - %02d/%02d/%d - %02d:%02d:%02d",Day,Month,Year,Hour,Minute,Second);
SendClientMessage(playerid,red,string);
format(string2, sizeof(string), "AC: %s has been banned for Fake Kills. - %02d/%02d/%d - %02d:%02d:%02d",name,reason,Day,Month,Year,Hour,Minute,Second);
SendClientMessageToAll(red,string2);
BanEx(playerid,string2);
}
else
if((gettime() - LastDeath[playerid]) > 5)
{
TotalDeaths[playerid]=0;
}
}
perfect thank you very much friends.....
I have a question, want to help me with a anticheat for my server, because the hacker gives same score to all users on my server, I want to know if there is any solution for this problem! well this is all thanks muhas friends to help me, God bless.. |