Annoying problem
#1

I'm putting a weapon anti-cheat on my script, and it keep giving me a automatic ban when I spawn. But I've seen on other tutorials the same thing as am doing on my script. Looks like:
pawn Код:
new Fweapons[][] =
{
    17, 35, 36, 37, 38, 39, 40, 44, 45
};
public OnPlayerUpdate(playerid)
{
    static string[200];
    for(new fw; fw < sizeof(Fweapons); fw++)
    {
        if(GetPlayerWeapon(playerid) == fw && GetPlayerState(playerid) != PLAYER_STATE_WASTED)
        {
            format(string,sizeof(string),""#red"%s "#green"(id: %d) "#ice" has been banned by the administrator BOT |"#yellow" Reason: Weapon hacks",GetMyName(playerid),playerid);
            GetPlayer(playerid);
            ini = INI_Open(playerfile);
            INI_WriteString(ini, "Banned", "Yes");
            INI_WriteString(ini, "Reason", "Weapon hacks");
            INI_Close(ini);
            MsgForAll(color,string);
            SoundForAll(1148);
            Kick(playerid);
        }
       
    }
    return 1;
}
After registering / spawing, it kicks me. The good looks correct as other tutorials and by what I know about "sizeof"
Reply


Messages In This Thread
Annoying problem - by blackwave - 28.03.2011, 21:19
Re: Annoying problem - by MrDeath537 - 28.03.2011, 21:28
Re: Annoying problem - by blackwave - 28.03.2011, 22:32
Re: Annoying problem - by blackwave - 29.03.2011, 09:36
Re: Annoying problem - by Gamer_Z - 29.03.2011, 09:51
Re: Annoying problem - by blackwave - 29.03.2011, 19:46

Forum Jump:


Users browsing this thread: 4 Guest(s)