Anti weapon hack
#1

Hey guys I want to make my own anti weapon hack, for start I searched a bit but there are only simple hack to ban players with minigun, granades and so on... than I saw few really complicated scripts that I don't like.. so I decided to make my own anti weapon hack system.. so what I want to make is.. there are shops where I can buy weapons (few locations with pickups and there is possible to write /buygun to buy weapon) so I want to detect if player buy weapon there will be all cool, if he didn't bought it he will be kicked / banned from server..

this is what I tried - I tried with commands cuz I didn't create pickups yet it should be same effect:

pawn Код:
public OnPlayerUpdate(playerid)
{
    if(GetPlayerWeapon(playerid) == 1 && Check[playerid] == 0 || GetPlayerWeapon(playerid) == 2 && Check[playerid] == 0 || GetPlayerWeapon(playerid) == 5 || GetPlayerWeapon(playerid) == 6 || GetPlayerWeapon(playerid) == 7 || GetPlayerWeapon(playerid) == 8 || GetPlayerWeapon(playerid) == 10 || GetPlayerWeapon(playerid) == 11 || GetPlayerWeapon(playerid) == 12 || GetPlayerWeapon(playerid) == 13 ) //Put here the IDs of weapons you want, I'll post link after pawn.
    {
        ResetPlayerWeapons(playerid);
        SendClientMessage(playerid,-1,"Hacking");
        return 1;
    }
    return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/weap", true))
    {
        GivePlayerWeapon(playerid, 1,1);
        Check[playerid] = 1;
        SetTimerEx("Check1", 2000, false, "i", playerid);
        return 1;
    }
    if(!strcmp(cmdtext, "/weapa", true))
    {
        GivePlayerWeapon(playerid, 2,1);
        return 1;
    }
    return 0;
}

public Check1(playerid)
{
    Check[playerid] = 0;
    return 1;
}

public OnPlayerConnect(playerid)
{
    Check[playerid] = 0;
    return 1;
}
The problem is when It resets the veriable it auto resets my weapons (I figured out why but I don't know how to change it so it can work ^^) .. and so on, can someone explain me a bit how can I make it and give me some tips maybe example? Thank you very much in advance
Reply
#2

tips
https://sampforum.blast.hk/showthread.php?tid=220089
Reply
#3

I think you need to update the player timeout code there cessil you shouldn't have to reload the ban list anymore Slice recently pointed this out to me.
Reply
#4

Did you check my anti weapon hack?
It is confusing, but it does the job. If you know how to use it.
And I can always assist you if needed.

Link: https://sampforum.blast.hk/showthread.php?tid=319800
Reply
#5

Quote:
Originally Posted by Deduction
Посмотреть сообщение
Did you check my anti weapon hack?
It is confusing, but it does the job. If you know how to use it.
And I can always assist you if needed.

Link: https://sampforum.blast.hk/showthread.php?tid=319800
that has misleading information and... well messy script, it would also detect a lot of false positive due to not considering lag
Reply
#6

Thank you for responds I will try to script it, if I will have problems I will let you know
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)