Raised This Month: $51 Target: $400
 12% 

Individual Weapon Restrictions


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Plugin Info:     Modification:   Counter-Strike        Category:   Admin Commands        Approver:   Exolent[jNr] (178)
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-27-2008 , 17:16   Individual Weapon Restrictions
Reply With Quote #1

Individual Weapon Restrictions v0.5

- Description -
This plugin restricts weapons on a per-player basis. All primary and secondary weapons are supported including all grenades; no shield support at this time. It saves all restrictions to the vault using the players SteamID as the key; if the player disconnects and rejoins, the restrictions will get re-applied. If a player purchases a weapon that is restricted, the players money spent on the restricted weapon will be reimbursed and the weapon gets deleted from game.

- Console Commands -
  • amx_restrictadd <partial name> <partial weapon> - Add a weapon restriction. Example: amx_restrictadd bugs gloc
  • amx_restrictremove <partial name> <partial weapon> - Remove a weapon restriction. Example: amx_restrictremove bugs gloc
  • amx_restrictclear <partial name> - Clears all weapon restrictions
- Chat Commands -
  • /restrict - Displays list of players restricted weapons
- Changelog -
  • v0.5
    - Changed the way restrictions are stored. Instead of storing individual weapon restrictions with an array of integers for each player, they are now stored in a single integer using bit-flags to represent each weapon index.
    - Added Ham_AddPlayerItem forward to detect when a player purchases a weapon. Adding this removed the need to monitor money transactions and the SetModel forward. When a restricted weapon is purchased we can block the player from ever receiving the weapon; the weapon will then be deleted and the players money is reimbursed.
    - Forwards are now enabled\disabled so are only active when needed.
    - Added weapon priority switching so if a player is carrying a weapon when a restriction is for it is added, the most powerful weapon will be set as current weapon. (from VENs real nade drop)
    - This release is nearly a complete re-write
  • v0.4
    - Added notification of weapon restriction when purchased. Now displays name of weapon.
    - Fixed bug where the removal of a restriction was not getting saved to vault
  • v0.3
    - Removed cstrike module and replaced with all fakemeta functions. Also removed WeapPickup, this is now handled in FM_Touch forward. Thanks to Exolent for tips on cleaning up the code.
    Revision - Re-added WeapPickup because weapon was not getting dropped when purchased via buyscript in FM_Touch
  • v0.2
    - Cleaned up the code
  • v0.1
    - Fixed an error index out of bounds in fw_Touch.

328
Attached Files
File Type: sma Get Plugin or Get Source (weaponrestrict.sma - 5249 views - 18.2 KB)
__________________

Last edited by Bugsy; 06-09-2009 at 00:09. Reason: New release
Bugsy is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:29.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode