iWeapons - Dynamic weapon control (with advanced anti db) -
iggy1 - 17.03.2011
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
Re: iWeapons - Dynamic weapon control (with advanced anti db) -
Medal Of Honor team - 17.03.2011
nice one!!
Re: iWeapons - Dynamic weapon control (with advanced anti db) -
iggy1 - 17.03.2011
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.
Re: iWeapons - Dynamic weapon control (with advanced anti db) -
Zh3r0 - 17.03.2011
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!
Re: iWeapons - Dynamic weapon control (with advanced anti db) -
vyper - 17.03.2011
Nice idea

good job
Re: iWeapons - Dynamic weapon control (with advanced anti db) -
Markx - 17.03.2011
Nice Iggy ^^
Re: iWeapons - Dynamic weapon control (with advanced anti db) -
iggy1 - 17.03.2011
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.
Re: iWeapons - Dynamic weapon control (with advanced anti db) -
admantis - 18.03.2011
really useful, good job iggy1!
Re: iWeapons - Dynamic weapon control (with advanced anti db) -
airsoft - 18.03.2011
Nicee....
Re: iWeapons - Dynamic weapon control (with advanced anti db) -
iggy1 - 20.03.2011
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.
Re: iWeapons - Dynamic weapon control (with advanced anti db) -
Jochemd - 29.03.2011
Very nice and usefull script! Good job.
Re: iWeapons - Dynamic weapon control (with advanced anti db) -
Baboon - 29.03.2011
gj, nicely scripted.
Re: iWeapons - Dynamic weapon control (with advanced anti db) -
aircombat - 29.03.2011
Very Nice Work , Well Done
Re: iWeapons - Dynamic weapon control (with advanced anti db) -
FalconX - 16.04.2012
Good job iggy
-FalconX
Respuesta: iWeapons - Dynamic weapon control (with advanced anti db) -
Francis. - 16.04.2012
I hate anti db scripts but the rest seems good.