31.03.2009, 12:18
Anti Weapon Cheating System, v.0.2 (Bug fixed)
developing!!!
Author: illay
developing!!!
Author: illay
pawn Код:
#include <a_samp>
/*Latest Update 03/04/09*/
forward public WeaponCheating();
forward public BanPlayer();
new TheWeapon[MAX_PLAYERS];
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Anti-Weapon Cheat by illay");
print(" Version V.0.2 (Tested) l.updt: 03/04/09");
print("--------------------------------------\n");
SetTimer("WeaponCheating",1000,true);
return 1;
}
public WeaponCheating() { //by illay
for(new i=0;i<MAX_PLAYERS;i++) {
TheWeapon[i]=GetPlayerWeapon(i);
if(TheWeapon[i]==35 /*thower*/ ||TheWeapon[i]==36 /*Rpg*/|| TheWeapon[i]==37 /* h_rpg*/|| TheWeapon[i]==38 /*minigun*/|| TheWeapon[i]==43 /*camera*/|| TheWeapon[i]==44/*Glasses*/|| TheWeapon[i]==45/*Glasses*/) {
SendClientMessage(i, 0xE60000FF, "No cheating in server! You have BANNED!");
return SetTimerEx("BanPlayer",500,false,"i","i");//Against causeless bannings
}
}
return 1; //return WeaponCheating() /retrurn WeaponCheating()/
}
public BanPlayer() { //by illay
for(new i=0;i<MAX_PLAYERS;i++) {
return BanEx(i,"WEAPON CHEATING");//samp.ban file reason "In game ban => WEAPON CHEATING
}
/*
Forbidding agendum:
------------------
ip (hidden) [03/04/09 | 15:19:33] Player - WEAPON CHEATING <= reason
------------------
*/
return 1;
}