11.01.2012, 13:26
PHP код:
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 Kicked. Reason: Weapons ",PlayerName,i);
SendClientMessageToAll(lightred, string);
new str[128];
format(str,sizeof(str),"%s has been Automatically Kicked. Reason: WeaponHack",PlayerName);
SaveIn("BanLog",str);
}
}
return 1;
}
ban is not good D
look this "BanEx(i,lbweapon);" i change it to "KickEx" but again bans... + makes server crash..
and change it "SaveIn("BanLog",str);" to "SaveIn("KickLog",str);" but again dont works..
Some1 can help me how to change it to KICK?
(its from luxadmin)
Thanks...