Raised This Month: $66 Target: $400
 16% 

BombSite Lock


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay        Approver:   ConnorMcLeod (74)
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-23-2010 , 22:32   BombSite Lock
Reply With Quote #1

BombSite Lock
.: v0.3

Description

This plugin allows you to lock bombsite(s), preventing them from being used. When a bombsite is locked, the player currently holding the bomb will have a HUD message indicating which bombsite(s) are locked. Bombsite locks will remain from round to round but not between map changes. There are cvars to control if and how bombsites are automatically locked depending on the number of CT players on the server.

Commands
  • bl_bombsitemenu - Self explanatory.
  • bl_setbombsite - Manually locks a single bombsite.
    • Usage bl_setbombsite a/b 0/1
      • a or b being the bombsite, 0=unlock, 1=lock
CVars
  • bl_allowplantctnum - Minimum number of CT players required to allow bomb planting (both sites would be locked if less).
    • Default: 0 (0=disabled or any number as # CT of players)
  • bl_locksitectnum - Minimum number of CT players required to have both bombsites open for planting. If there are less CT players, one of the bombsites (defined by cvar bl_locksite) will be locked.
    • Default: 2 (0=disabled or any number as # CT of players)
  • bl_locksite - The bombsite that will be locked if the number of CT players is less than bl_locksitectnum value.
    • Default: b (Must be a or b)

Modules
  • Engine

Menu ScreenShot



ChangeLog
  • 0.3
    • Added support for all maps (experimental).
      • Bombsites on all of the standard CS maps with an A and B designation should all work properly according to A and B naming. Maps without an A and B designation will still be treated as A and B by the plugin; A and B is chosen by the plugin based on which bombsite entity is spawned first. If you notice a map where A and B are handled by the plugin oppositely, let me know and I can correct it.
    • Menu will now display only the available commands for use. ie, if A is already locked, "Lock A" menu item will be disabled etc.
    • Fixed bug which affected the HUD being displayed to the user holding the bomb.
    • Added cvars to control auto-locking of bombsites. See above.
  • 0.2
    • Initial release
Attached Files
File Type: sma Get Plugin or Get Source (bombsite_lock.sma - 5279 views - 9.0 KB)
__________________

Last edited by Bugsy; 09-27-2010 at 09:50. Reason: New release
Bugsy is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 09-24-2010 , 04:00   Re: BombSite Lock
Reply With Quote #2

What, no support for inferno, train and nuke ? :/

Hmm... map entities spawn order doesn't change, no ? You could detect wich one is wich by their order.
__________________
Hunter-Digital is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 09-24-2010 , 06:41   Re: BombSite Lock
Reply With Quote #3

Make a command to set A & B's on your own for custom maps. Also use model instead of target, much better
__________________
xPaw is offline
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 09-24-2010 , 06:59   Re: BombSite Lock
Reply With Quote #4

Great Plugin:
One suggestion i.e you can make the menus global and make them in the plugin init sincei heard that this is an effecient way and creating menus every time is not a good idea unless youre menus are dynamic
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-24-2010 , 10:22   Re: BombSite Lock
Reply With Quote #5

I think such plugin should be merged with : http://forums.alliedmods.net/showthread.php?p=562807 .
__________________
Arkshine is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-24-2010 , 10:26   Re: BombSite Lock
Reply With Quote #6

Thanks for the comments\suggestions guys, I do plan on adding features\maps as time goes. This plugin was made by request so I just wanted to make a functioning copy available sooner than later.

@xpaw, how is model much better than target? Just curious.
__________________
Bugsy is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 09-24-2010 , 10:30   Re: BombSite Lock
Reply With Quote #7

Interresting. About what arkshine said, kinda true.
Maybe add like a minimum count of cts ( or ts) to unlock the bombsites.
__________________
I am out of order!
grimvh2 is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 09-24-2010 , 11:28   Re: BombSite Lock
Reply With Quote #8

Quote:
Originally Posted by Bugsy View Post
@xpaw, how is model much better than target? Just curious.
There can be multiple entities with same target, model is always unique on current bsp version (on map recompile it may change for example, but not anyhow affected by server)
__________________
xPaw is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-24-2010 , 12:31   Re: BombSite Lock
Reply With Quote #9

I did notice this when I was researching target names on maps. Though, I don't think this affects anything for the current supported maps but I will keep it in mind for future map additions.
__________________
Bugsy is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 09-24-2010 , 12:49   Re: BombSite Lock
Reply With Quote #10

CurWeapon event code is weird.
Suppose player A switch to c4, then the variable is set to that player index, and at the same moment player B shot with a weapon or switches to any weapon, then variable is set to 0.
I don't remember if bomb carrier is stored in my plugin, but you can look in it, or in VEN's tutorial on bomb scripting.

Also, you should make the plugin more dynamic so it could support any map.
__________________
- tired and retired -

Last edited by ConnorMcLeod; 09-24-2010 at 12:52.
ConnorMcLeod is offline
Reply


Thread Tools
Display Modes

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 23:15.


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