21.08.2012, 21:32
Forbbiden Weapons!
I'm using INI, I just want to know to to do it!
pawn Код:
forward WeaponCheck
public WeaponCheck(playerid)
{
for(new i=0;i<MAX_PLAYERS;i++)
{
new lbweapon[64];
new string[128];
new var;
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
var=GetPlayerWeapon(i);
if(IsForbiddenWeapon(var) && WeaponForbiddenForPlayer[i][var] && AccInfo[i][Level] == 0 && ServerInfo[ForbiddenWeaps] == 1)
{
SendClientMessage(i,lightred, "|- You have been Automatically Banned. | Reason: WeaponHack -| ");
GetWeaponName(var,lbweapon,sizeof(lbweapon));
format(lbweapon,sizeof(lbweapon),"Weapon Cheat (%s)",lbweapon);
BanEx(i,lbweapon);
format(string,sizeof(string),"|- Player %s (Id:%d) has been Automatically Banned. | Reason: Weapon Hack -|",PlayerName,i);
SendClientMessageToAll(lightred, string);
new str[128];
format(str,sizeof(str),"%s has been Automatically Banned. | Reason: WeaponHack",PlayerName);
SaveIn("BanLog",str);
}
}
return 1;
}
//========================