22.06.2015, 07:12
Well, I'm using this script. I want to add a warning system. I mean, If player try to hack weapons at first time it should be restplayerweapons and if he try to hack again then it should ban player.
i have tried but idk what's wrong.
Well, This work good but i want to add if player try to hack again which means 2nd time then it should kick player.
i have tried but idk what's wrong.
PHP код:
public BadCheck()
{
new weap, string[228], string3[256], pname[MAX_PLAYER_NAME]; //
for(new i, b = GetMaxPlayers(); i < b; i++) //
{
GetPlayerName(i, pname, sizeof(pname));
weap = GetPlayerWeapon(i);
for(new w; w < sizeof(BadWeapons); w++)
{
if(pInfo[i][pAdmin] < 1)
{
if(weap == BadWeapons[w])
{
format(string,sizeof(string),"SERVER ANTI-CHEAT: %s is trying to hack weapons.", pname);
SendMessageToAdmins(RED,string);
ResetPlayerWeapons(i);
}
}
}
}
return 1;
}