[FilterScript] Forbidden Weapon anti-cheat (no timers)
#1

Hi folks, this is my first FS on this forum so I hope you like it.

Last days I had a problem with my weapon anticheat with timer. I dont know why but timers sometimes fail to ban weapon hackers or if they ban, cheater can kill a lot of players before he got banned. So, I decided to script this simple script.

How it works?

Is simple, if cheater try to use any of these forbidden weapons he will be banned the first moment he press fire key.

pawn Код:
#include <a_samp>


public OnFilterScriptInit()
{
print("Forbidden Weapon FS Loaded");
}

public OnFilterScriptExit()
{
print("Forbidden Weapon FS Unloaded");
}


public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_FIRE && ForbiddenWeap(playerid) && !IsPlayerAdmin(playerid))
        {
            new pname[MAX_PLAYER_NAME];
            new string[124];
            GetPlayerName(playerid, pname, sizeof(pname));
            format(string, sizeof(string), "SERVER: %s has been banned! Reason: Forbidden weapon", pname);
            SendClientMessageToAll(0xffffffff,string);
            print(string);
            BanEx(playerid,string);
            return 1;
        }
    return 0;
}

stock ForbiddenWeap(playerid)
{
    new weap = GetPlayerWeapon(playerid);
    if( weap == 35 || weap == 36 || weap == 37 || weap == 38 || weap == 39 || weap == 40 || weap == 41 || weap == 42 || weap == 43 || weap == 44 || weap == 45)
    {
     return true;
    }
    return false;
}

//===========================Forbidden Weapons==================================
//id 35 = Rocket Launcher
//id 36 = HS Rocket Launcher
//id 37 = Flamethrower
//id 38 = Minigun
//id 39 = Satchel Charge
//id 40 = Detonator
//id 41 = Spraycan
//id 42 = Fire Extinguisher
//id 43 = Camera
//id 44 = Nightvision Goggles
//id 45 = Thermal Goggles
Reply
#2

....
Reply
#3

Quote:
Originally Posted by Eirikm
Посмотреть сообщение
Clean 'N' Easy

Cant see anything wrong here

God Work, Keep it up!
Thx
Reply
#4

good work main!
Reply
#5

Its really nice. Before this, i've made it with an timer. good work.
Reply
#6

Sorry, but this isn't efficent, if an admin gives a Rocket to another user, he will get banned
Reply
#7

Quote:
Originally Posted by Rapgangsta
Посмотреть сообщение
Sorry, but this isn't efficent, if an admin gives a Rocket to another user, he will get banned
Your brain isnt efficient my friend, probably lack of oxygen

If admin gives minigun to normal player and if is there anticheat he will be banned with this or any other anticheat.
Reply
#8

Quote:
Originally Posted by ******
Посмотреть сообщение
No they won't! Not if the anti cheat is coded in ANY way well!
Ppl can do whatever they want with this script, make it worst or better. this is just an example how to ban cheater without checking all players. If they dont know how to edit some simple code and make it better thats their problem.
Reply
#9

How can I give weapons admins who givegun not take ban?
Reply
#10

I've seen a lot of kind of this "anti-cheat" but I still can't see the point, why you wasting your time for it, If someone will give to himself a shotgun or deagle? anyways great job, keep it up.
Reply
#11

but
i need minigun
and i do
/giveweapon for admin
this is give ban ?
Reply
#12

Quote:
Originally Posted by elad02658
Посмотреть сообщение
but
i need minigun
and i do
/giveweapon for admin
this is give ban ?
Dont you see the date? It's 2012 thread.. why are you bumping it? ..God.
Reply
#13

how to disable it banning admins ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)