16.11.2010, 11:42
Hai all,i need little help.
I've this small anti cheat:
I need to write this AUTOBANS in a autobans.log file
Is there any way?
I've this small anti cheat:
Код:
#include <a_samp>
//AntiCheat
new timer1;
public OnGameModeInit()
{
timer1 = SetTimer("AntiCheat",5000,true);
return 1;
}
forward AntiCheat();
public AntiCheat()
{
new weap, ammo;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerWeaponData(i, 7, weap, ammo);
if(weap == 38)
{
new string [128];
new pName[MAX_PLAYER_NAME];
GetPlayerName(i, pName, sizeof(pName));
format(string, sizeof(string), "%s has been banned. (Reason: AUTO BAN Minigun Cheat)", pName);
SendClientMessageToAll(0xFF0000FF, string);
BanEx(i, "Auto Ban - Minigun");
break;
}
GetPlayerWeaponData(i, 7, weap, ammo);
if(weap == 35)
{
new string [128];
new pName[MAX_PLAYER_NAME];
GetPlayerName(i, pName, sizeof(pName));
format(string, sizeof(string), "%s has been banned (Reason: AUTO BAN Rocket launcher Cheat)", pName);
SendClientMessageToAll(0xFF0000FF, string);
BanEx(i, "Auto Ban - Rocket Launcher");
break;
}
}
}
return 1;
}
public OnGameModeExit()
{
KillTimer(timer1);
return 1;
}
Is there any way?

