anti weapon Hack Problem
#1

Hi this is my anti weapon hack
PHP код:
new bool:ACWep[MAX_PLAYERS][50];
new 
TofAll[MAX_PLAYERS];
new 
Cheating[MAX_PLAYERS];
stock GivePlayerGun(plyidweaponidammo)
{
    if(
unsentwep[plyid] == 1)
    {
        
GivePlayerGun(plyidweaponidammo);
        return 
1;
    }
    
ACWep[plyid][weaponid] = true;
    
GivePlayerWeapon(plyidweaponidammo);
    return 
1;
}
public 
OnPlayerDeath(playerid,killerid,reason);
{
    
TofAll[playerid] = 0;
return 
1;
}
public 
OnPlayerSpawn(playerid)
{
TofAll[playerid] = 1;
return 
1;
}
public 
OnPlayerConnect(playerid)
{
    for(new 
i;i<46;i++) ACWep[playerid][i] = true;
    
TofAll[playerid] = 0;  
Cheating[playerid] = 0
                    
CheckWeaponTime[playerid] = SetTimerEx("CheckWeaponHack",1000,true,"i",playerid);
     
return 
1;

PHP код:
public CheckWeaponHack(playerid)
{
    if(
IsPlayerConnected(playerid))
    {
        if(
gPlayerLogged[playerid] == && TofAll[playerid] == && Cheating[playerid] == 0)
        {
            for(new 
1;i<46;i++)
            {
                if(
20 || 18)
                {
                    if(
GetPlayerWeapon(playerid) == && ACWep[playerid][i] != true)
                    {
                        new 
reason[70], WeapName[50];
                        
GetWeaponName(iWeapName50);
                        
format(reason70"Weapon hack(%s)"WeapName);
                        
BanPlayer(INVALID_PLAYER_IDPINFO[playerid][pName], 0reason);
                        
Cheating[playerid] = 1;
                    }
                }
            }
            if(
GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK && PINFO[playerid][pAdmin] <= 0)
            {
                new 
cheatername[MAX_PLAYER_NAME];
                
GetPlayerName(playerid,cheatername,MAX_PLAYER_NAME);
                
BanPlayer(INVALID_PLAYER_IDcheatername0"Weapon hack(Jetpack)");
                
Cheating[playerid] = 1;
                return 
1;
            }
        }
    }
    return 
1;

Please help me for +Rep
Reply
#2

Whats the problem exactly?
Reply
#3

We're not magicians, tell us your problem.
Reply
#4

the anti weapon hack doesn't work what is the problem exactly?
Reply
#5

BUMP!
Reply
#6

You have to tell us /what/ is not working about it. We cannot guess your problems.
Reply
#7

Try this one http://pastebin.com/q3dzHmeC
Reply
#8

I assume the thread creator saying "BUMP" it is not necessary to post anymore...
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)