[Help] My anti weapon systen dont work good!
#1

Hey guys,

I just have created a ANTI WEAPON CHEAT SYSTEM.
But it didnt work really work good, I have scripted a lot of weapons, It bans automatically good, but when a player spawn he got basic weapons. But when I press 'Spawn' I am auto banned for weapon cheat, but i didnt cheat, thats WRONG.

Peoples need only automatically banned when they cheat some weapons.
But now peoples got automatically banned when they spawn, because they got basic weapons.

This is the script:

PHP код:
public OnPlayerUpdate(playerid)
{
            new 
weaponid GetPlayerWeapon(playerid);
            new 
Nam[MAX_PLAYER_NAME];
            new 
str[128];
            if(
weaponid == 16)
            {
            
GetPlayerName(playerid,Nam,sizeof(Nam));
            
format(str,sizeof(str),"-UGW- %s (%d) has been automatically banned for killing with and having a cheated Grenade.",Nam);
            
SendClientMessageToAll(0xFF0000FF,str);
            
BanEx(playerid,"Anti Weapon Cheat Hack!");
            }
            if(
weaponid == 39)
            {
            
GetPlayerName(playerid,Nam,sizeof(Nam));
            
format(str,sizeof(str),"-UGW- %s (%d) has been automatically banned for killing with and having a cheated Satchel Charge.",Nam);
            
SendClientMessageToAll(0xFF0000FF,str);
            
BanEx(playerid,"Anti Weapon Cheat Hack!");
            }
            if(
weaponid == 38)
            {
            
GetPlayerName(playerid,Nam,sizeof(Nam));
            
format(str,sizeof(str),"-UGW- %s (%d) has been automatically banned for killing with and having a cheated Minigun.",Nam);
            
SendClientMessageToAll(0xFF0000FF,str);
            
BanEx(playerid,"Anti Weapon Cheat Hack!");
            }
            if(
weaponid == 37)
            {
            
GetPlayerName(playerid,Nam,sizeof(Nam));
            
format(str,sizeof(str),"-UGW- %s (%d) has been automatically banned for killing with and having a cheated Flamethrower.",Nam);
            
SendClientMessageToAll(0xFF0000FF,str);
            
BanEx(playerid,"Anti Weapon Cheat Hack!");
            }
            if(
weaponid == 36)
            {
            
GetPlayerName(playerid,Nam,sizeof(Nam));
            
format(str,sizeof(str),"-UGW- %s (%d) has been automatically banned for killing with and having a cheated HS Rocket.",Nam);
            
SendClientMessageToAll(0xFF0000FF,str);
            
BanEx(playerid,"Anti Weapon Cheat Hack!");
            }
            if(
weaponid == 35)
            {
            
GetPlayerName(playerid,Nam,sizeof(Nam));
            
format(str,sizeof(str),"-UGW- %s (%d) has been automatically banned for killing with and having a cheated RPG.",Nam);
            
SendClientMessageToAll(0xFF0000FF,str);
            
BanEx(playerid,"Anti Weapon Cheat Hack!");
            }
            if(
weaponid == 44)
            {
            
GetPlayerName(playerid,Nam,sizeof(Nam));
            
format(str,sizeof(str),"-UGW- %s (%d) has been automatically banned for killing with and having a Night Vis Goggles.",Nam);
            
SendClientMessageToAll(0xFF0000FF,str);
            
BanEx(playerid,"Anti Weapon Cheat Hack!");
            }
            if(
weaponid == 45)
            {
            
GetPlayerName(playerid,Nam,sizeof(Nam));
            
format(str,sizeof(str),"-UGW- %s (%d) has been automatically banned for killing with and having a cheated Thermal Goggles.",Nam);
            
SendClientMessageToAll(0xFF0000FF,str);
            
BanEx(playerid,"Anti Weapon Cheat Hack!");
            }
            if(
weaponid == 43)
            {
            
GetPlayerName(playerid,Nam,sizeof(Nam));
            
format(str,sizeof(str),"-UGW- %s (%d) has been automatically banned for killing with and having a cheated Camera.",Nam);
            
SendClientMessageToAll(0xFF0000FF,str);
            
BanEx(playerid,"Anti Weapon Cheat Hack!");
            }
            if(
weaponid == 46)
            {
            
GetPlayerName(playerid,Nam,sizeof(Nam));
            
format(str,sizeof(str),"-UGW- %s (%d) has been automatically banned for killing with and having a cheated Parachute.",Nam);
            
SendClientMessageToAll(0xFF0000FF,str);
            
BanEx(playerid,"Anti Weapon Cheat Hack!");
            }
            if(
weaponid == 41)
            {
            
GetPlayerName(playerid,Nam,sizeof(Nam));
            
format(str,sizeof(str),"-UGW- %s (%d) has been automatically banned for killing with and having a cheated Spraycan.",Nam);
            
SendClientMessageToAll(0xFF0000FF,str);
            
BanEx(playerid,"Anti Weapon Cheat Hack!");
            }
            if(
weaponid == 40)
            {
            
GetPlayerName(playerid,Nam,sizeof(Nam));
            
format(str,sizeof(str),"-UGW- %s (%d) has been automatically banned for killing with and having a cheated Detanator.",Nam);
            
SendClientMessageToAll(0xFF0000FF,str);
            
BanEx(playerid,"Anti Weapon Cheat Hack!");
            }
            if(
weaponid == 42)
            {
            
GetPlayerName(playerid,Nam,sizeof(Nam));
            
format(str,sizeof(str),"-UGW- %s (%d) has been automatically banned for killing with and having a cheated Fire Extinguisher.",Nam);
            
SendClientMessageToAll(0xFF0000FF,str);
            
BanEx(playerid,"Anti Weapon Cheat Hack!");
            }
            if(
weaponid == 34)
            {
            
GetPlayerName(playerid,Nam,sizeof(Nam));
            
format(str,sizeof(str),"-UGW- %s (%d) has been automatically banned for killing with and having a cheated Sniper Rifle.",Nam);
            
SendClientMessageToAll(0xFF0000FF,str);
            
BanEx(playerid,"Anti Weapon Cheat Hack!");
            }
            if(
weaponid == 33)
            {
            
GetPlayerName(playerid,Nam,sizeof(Nam));
            
format(str,sizeof(str),"-UGW- %s (%d) has been automatically banned for killing with and having a cheated Country Rifle.",Nam);
            
SendClientMessageToAll(0xFF0000FF,str);
            
BanEx(playerid,"Anti Weapon Cheat Hack!");
            }
            if(
weaponid == 32)
            {
            
GetPlayerName(playerid,Nam,sizeof(Nam));
            
format(str,sizeof(str),"-UGW- %s (%d) has been automatically banned for killing with and having a cheated Tec9.",Nam);
            
SendClientMessageToAll(0xFF0000FF,str);
            
BanEx(playerid,"Anti Weapon Cheat Hack!");
            }
            if(
weaponid == 31)
            {
            
GetPlayerName(playerid,Nam,sizeof(Nam));
            
format(str,sizeof(str),"-UGW- %s (%d) has been automatically banned for killing with and having a cheated M4.",Nam);
            
SendClientMessageToAll(0xFF0000FF,str);
            
BanEx(playerid,"Anti Weapon Cheat Hack!");
            }
            if(
weaponid == 30)
            {
            
GetPlayerName(playerid,Nam,sizeof(Nam));
            
format(str,sizeof(str),"-UGW- %s (%d) has been automatically banned for killing with and having a cheated AK 47.",Nam);
            
SendClientMessageToAll(0xFF0000FF,str);
            
BanEx(playerid,"Anti Weapon Cheat Hack!");
            }
            if(
weaponid == 29)
            {
            
GetPlayerName(playerid,Nam,sizeof(Nam));
            
format(str,sizeof(str),"-UGW- %s (%d) has been automatically banned for killing with and having a cheated MP5.",Nam);
            
SendClientMessageToAll(0xFF0000FF,str);
            
BanEx(playerid,"Anti Weapon Cheat Hack!");
            }
            if(
weaponid == 28)
            {
            
GetPlayerName(playerid,Nam,sizeof(Nam));
            
format(str,sizeof(str),"-UGW- %s (%d) has been automatically banned for killing with and having a cheated Micro SMG Uzi.",Nam);
            
SendClientMessageToAll(0xFF0000FF,str);
            
BanEx(playerid,"Anti Weapon Cheat Hack!");
            }
            if(
weaponid == 27)
            {
            
GetPlayerName(playerid,Nam,sizeof(Nam));
            
format(str,sizeof(str),"-UGW- %s (%d) has been automatically banned for killing with and having a cheated Combat shotgun.",Nam);
            
SendClientMessageToAll(0xFF0000FF,str);
            
BanEx(playerid,"Anti Weapon Cheat Hack!");
            }
            if(
weaponid == 26)
            {
            
GetPlayerName(playerid,Nam,sizeof(Nam));
            
format(str,sizeof(str),"-UGW- %s (%d) has been automatically banned for killing with and having a cheated Sawnoff shotgun.",Nam);
            
SendClientMessageToAll(0xFF0000FF,str);
            
BanEx(playerid,"Anti Weapon Cheat Hack!");
            }
            if(
weaponid == 25)
            {
            
GetPlayerName(playerid,Nam,sizeof(Nam));
            
format(str,sizeof(str),"-UGW- %s (%d) has been automatically banned for killing with and having a cheated Shotgun.",Nam);
            
SendClientMessageToAll(0xFF0000FF,str);
            
BanEx(playerid,"Anti Weapon Cheat Hack!");
            }
            if(
weaponid == 24)
            {
            
GetPlayerName(playerid,Nam,sizeof(Nam));
            
format(str,sizeof(str),"-UGW- %s (%d) has been automatically banned for killing with and having a cheated Desert Eagle.",Nam);
            
SendClientMessageToAll(0xFF0000FF,str);
            
BanEx(playerid,"Anti Weapon Cheat Hack!");
            }
            if(
weaponid == 23)
            {
            
GetPlayerName(playerid,Nam,sizeof(Nam));
            
format(str,sizeof(str),"-UGW- %s (%d) has been automatically banned for killing with and having a cheated Silenced 9mm.",Nam);
            
SendClientMessageToAll(0xFF0000FF,str);
            
BanEx(playerid,"Anti Weapon Cheat Hack!");
            }
            if(
weaponid == 22)
            {
            
GetPlayerName(playerid,Nam,sizeof(Nam));
            
format(str,sizeof(str),"-UGW- %s (%d) has been automatically banned for killing with and having a cheated 9mm.",Nam);
            
SendClientMessageToAll(0xFF0000FF,str);
            
BanEx(playerid,"Anti Weapon Cheat Hack!");
            }
            if(
weaponid == 17)
            {
            
GetPlayerName(playerid,Nam,sizeof(Nam));
            
format(str,sizeof(str),"-UGW- %s (%d) has been automatically banned for killing with and having a cheated Tear Gas.",Nam);
            
SendClientMessageToAll(0xFF0000FF,str);
            
BanEx(playerid,"Anti Weapon Cheat Hack!");
            }
            return 
1;

Hope anyone can fix this or help me out of this bug.

Thanks
Reply


Messages In This Thread
[Help] My anti weapon systen dont work good! - by mickos - 22.07.2012, 10:58
Re: [Help] My anti weapon systen dont work good! - by Kindred - 22.07.2012, 11:11
Re: [Help] My anti weapon systen dont work good! - by Vince - 22.07.2012, 11:15

Forum Jump:


Users browsing this thread: 1 Guest(s)