[FilterScript] iWeapons - Dynamic weapon control (with advanced anti db)
#1


iWeapons
Dynamic Weapon control system.

What does it do?

With this filterscript you can ban/unban weapons ingame via some rcon commands. You can also disable/enable drivebys. In addition to the normal antidb you can also ban individual players from drivebys, for those players who are serial db'ers. It also disables players from being able to enter a vehicle as a passenger when there is no driver. Also you can ban any weapon from being used in a driveby (individually). All settings are saved to an ini file named "iWeaponConfig.ini" via y_ini. You can also set the update time (which is how often illegal weapons will be checked) default set at 10 seconds.
NOTE: This script will not ban/kick players, not yet at least. If a banned weapon is found the player will be disarmed. Players will just have their weapon set to unarmed for drivebys.

Features
  • Disable drivebys
  • Disable any weapon from being used in a passenger driveby.
  • Disable individual players from commiting drivebys.
  • Players can't enter a vehicle (as passenger) w/o a driver.
  • Disable any weapon from being used. In or out of vehicles.


The commands (all rcon):
  • /weaponhelp - list all iWeapon commands
  • /banweapon, /unbanweapon - Can be name or weaponid, will disarm players with this weapon
  • /bandb, /unbandb - disable/enable drivebys
  • /bandbweapon, /unbandbweapon - Can be name or weaponid, disables passengers from using this weapon
  • /banplayerdb - Ban individual player from dbs.
  • /weaponupdate - change the update time for weapon checks
  • /banallweapons. or /baw - Ban all weapons
Please report any bugs/suggestions here.

CREDITS:
****** - foreach / y_ini
ZeeX - zcmd

Note the download includes everything needed.
Download: http://solidfiles.com/d/6b28b/
Pastebin: http://pastebin.com/HBCBEg5U
Reply
#2

nice one!!
Reply
#3

Quote:
Originally Posted by Medal Of Honor team
Посмотреть сообщение
nice one!!
Thanks, iv thought of a few things iv left out like saving drivebys being disabled atm it only saves banned weapons bit busy now, i'll update it tommorow maybe later tonight.
Reply
#4

How about this:
pawn Код:
INI:iWeaponConfig[](name[], value[])
{
    for ( new i = 1; i < 44; i++ )
    {
        new Str[ 30 ];
        format( Str, 30, "weapon%d", i );
        INI_Bool( Str, wc_iWeaponData[ wc_BannedWeapons ] [ i ]);
    }
    return 0;
}
Instead of:

pawn Код:
INI:iWeaponConfig[](name[], value[])
{
    INI_Bool("weapon1", wc_iWeaponData[ wc_BannedWeapons ] [ 1 ]);
    INI_Bool("weapon2", wc_iWeaponData[ wc_BannedWeapons ] [ 2 ]);
    INI_Bool("weapon3", wc_iWeaponData[ wc_BannedWeapons ] [ 3 ]);
    INI_Bool("weapon4", wc_iWeaponData[ wc_BannedWeapons ] [ 4 ]);
    INI_Bool("weapon5", wc_iWeaponData[ wc_BannedWeapons ] [ 5 ]);
    INI_Bool("weapon6", wc_iWeaponData[ wc_BannedWeapons ] [ 6 ]);
    INI_Bool("weapon7", wc_iWeaponData[ wc_BannedWeapons ] [ 7 ]);
    INI_Bool("weapon8", wc_iWeaponData[ wc_BannedWeapons ] [ 8 ]);
    INI_Bool("weapon9", wc_iWeaponData[ wc_BannedWeapons ] [ 9 ]);
    INI_Bool("weapon10", wc_iWeaponData[ wc_BannedWeapons ][ 10 ]);
    INI_Bool("weapon11", wc_iWeaponData[ wc_BannedWeapons ][ 11 ]);
    INI_Bool("weapon12", wc_iWeaponData[ wc_BannedWeapons ][ 12 ]);
    INI_Bool("weapon13", wc_iWeaponData[ wc_BannedWeapons ][ 13 ]);
    INI_Bool("weapon14", wc_iWeaponData[ wc_BannedWeapons ][ 14 ]);
    INI_Bool("weapon15", wc_iWeaponData[ wc_BannedWeapons ][ 15 ]);
    INI_Bool("weapon16", wc_iWeaponData[ wc_BannedWeapons ][ 16 ]);
    INI_Bool("weapon17", wc_iWeaponData[ wc_BannedWeapons ][ 17 ]);
    INI_Bool("weapon18", wc_iWeaponData[ wc_BannedWeapons ][ 18 ]);
    INI_Bool("weapon22", wc_iWeaponData[ wc_BannedWeapons ][ 22 ]);
    INI_Bool("weapon23", wc_iWeaponData[ wc_BannedWeapons ][ 23 ]);
    INI_Bool("weapon24", wc_iWeaponData[ wc_BannedWeapons ][ 24 ]);
    INI_Bool("weapon25", wc_iWeaponData[ wc_BannedWeapons ][ 25 ]);
    INI_Bool("weapon26", wc_iWeaponData[ wc_BannedWeapons ][ 26 ]);
    INI_Bool("weapon27", wc_iWeaponData[ wc_BannedWeapons ][ 27 ]);
    INI_Bool("weapon28", wc_iWeaponData[ wc_BannedWeapons ][ 28 ]);
    INI_Bool("weapon29", wc_iWeaponData[ wc_BannedWeapons ][ 29 ]);
    INI_Bool("weapon30", wc_iWeaponData[ wc_BannedWeapons ][ 30 ]);
    INI_Bool("weapon31", wc_iWeaponData[ wc_BannedWeapons ][ 31 ]);
    INI_Bool("weapon32", wc_iWeaponData[ wc_BannedWeapons ][ 32 ]);
    INI_Bool("weapon33", wc_iWeaponData[ wc_BannedWeapons ][ 33 ]);
    INI_Bool("weapon34", wc_iWeaponData[ wc_BannedWeapons ][ 34 ]);
    INI_Bool("weapon35", wc_iWeaponData[ wc_BannedWeapons ][ 35 ]);
    INI_Bool("weapon36", wc_iWeaponData[ wc_BannedWeapons ][ 36 ]);
    INI_Bool("weapon37", wc_iWeaponData[ wc_BannedWeapons ][ 37 ]);
    INI_Bool("weapon38", wc_iWeaponData[ wc_BannedWeapons ][ 38 ]);
    INI_Bool("weapon39", wc_iWeaponData[ wc_BannedWeapons ][ 39 ]);
    INI_Bool("weapon40", wc_iWeaponData[ wc_BannedWeapons ][ 40 ]);
    INI_Bool("weapon41", wc_iWeaponData[ wc_BannedWeapons ][ 41 ]);
    INI_Bool("weapon42", wc_iWeaponData[ wc_BannedWeapons ][ 42 ]);
    INI_Bool("weapon43", wc_iWeaponData[ wc_BannedWeapons ][ 43 ]);
    return 0;
}
Otherwise, good job!
Reply
#5

Nice idea good job
Reply
#6

Nice Iggy ^^
Reply
#7

Quote:
Originally Posted by Zh3r0
Посмотреть сообщение
How about this:
Instead of:...

Otherwise, good job!
Thanks, and you have a good point I should have done it like that.
Also thanks moht, vyper and marx.

I will update this code tommorow, i might uncomment the anti-team kill code in there, and add heli/car kills to the banned weapon list. But you will be killed instead of disarmed. If anyone has any suggestions please let me know.
Reply
#8

really useful, good job iggy1!
Reply
#9

Nicee....
Reply
#10

Update

- Fixed bugs with banned weapons not being saved to the file correctly.
- Added /banallweapons command
- Banned driveby weapons are now saved to file, and loaded to vars when the script is loaded.
- Null checks added on commands that expect params.
- y_ini reading functions modified. As per Zh3r0s suggestion.
- /bandb now disarms everyone in a vehicle, as soon as this command is used.

Banned driveby weapons are now saved and loaded.

Zh3r0 i give my appologies in the code i misspelt your name (i wasn't connected to the web at the time of writting). I only realised after updating all my links so i will edit it on the next update.
Reply
#11

Very nice and usefull script! Good job.
Reply
#12

gj, nicely scripted.
Reply
#13

Very Nice Work , Well Done
Reply
#14

Good job iggy

-FalconX
Reply
#15

I hate anti db scripts but the rest seems good.
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)