29.06.2015, 21:19
PHP код:
new ArmasProibidas[26][3] =
{
1,2,3,8,9,10,11,12,13,16,17,18,26,27,28,30,31,32,33,34,35,36,37,38,39,42
};
new ArmasPermitidas[17][3] =
{
0,4,5,6,7,14,15,19,20,21,22,23,24,25,29,40,41
};
PHP код:
public WeaponAntiCheat()
{
new string[128];
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= 1 || PlayerInfo[i][pGM] >= 1) { continue; }
new weap = GetPlayerWeapon(i);
for(new w = 0; w < sizeof(ArmasProibidas); w++)
{
if(weap == ArmasProibidas[w][2])
{
format(string, sizeof(string), "Weapon Cheat (ID da arma: %d)", weap);
KickAutomatico(i, "Servidor", string);
}
}
for(new w = 0; w < sizeof(ArmasPermitidas); w++)
{
if(GetPlayerScore(i) >= 3) continue;
if(weap == ArmasPermitidas[w][2])
{
format(string, sizeof(string), "[ANTI-CHEAT] {FFFFFF}O jogador %s (ID:%d) pode estar a utilizar Weapon Cheat (ID da arma: %d)", GetPlayerNameEx(i), i, weap);
for(new p=0; p<MAX_PLAYERS; p++)
{
if(!IsPlayerConnected(p)) continue;
if(PlayerInfo[p][pAdmin] != 0 || PlayerInfo[p][pGM] != 0)
{
SendClientMessage(p, COLOR_EFEITO, string);
}
}
}
}
}
}
return 1;
}