07.11.2010, 13:43
Quote:
You can try using this
|
pawn Код:
#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), "BANNED: %s has been auto banned by console. (Reason: Minigun Cheat)", pName);
SendClientMessageToAll(0xFF0000FF, string);
BanEx(i, "AntiCheat - 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), "BANNED: %s has been auto banned by console. (Reason: Rocket launcher Cheat)", pName);
SendClientMessageToAll(0xFF0000FF, string);
BanEx(i, "AntiCheat - Rocket Launcher");
break;
}
}
}
return 1;
}
public OnGameModeExit()
{
KillTimer(timer1);
return 1;
}