Code:
/*
* No Double Push - Locks buttons.
*
*
* Description:
* Locks func_button and func_rot_button entities for a certain amount of time, to prevent double pushing on deathrun or other maps.
*
*
* Installation:
* Place the 'nodoublepush.smx' into your "<moddir>/addons/sourcemod/plugins" folder.
* Place the 'plugin.nodoublepush.cfg' into your "<moddir>/cfg/sourcemod/" folder.
*
*
* Configuration:
* sm_nodoublepush_enable - Enable or disable No Double Push.
* sm_nodoublepush_time - The time in seconds, when the button should be unlocked again. -1 will never unlock the buttons again.
* sm_nodoublepush_deathrun - How to handle deathrun maps: 0 this plugin is always on, 1 this plugin is only on deathrun maps on, 2 this plugin is only on deathrun maps off.
* sm_nodoublepush_triggertime - Only change the time of buttons if the original time (in seconds) is greater than this value (in seconds).
* sm_nodoublepush_enablecolor - If this is set to 1 every button turns red when locked. By setting this to 0 the buttrons never change color.
*
*
* Changelog:
* 05.12.2015 - v2.4.6 - Added cvar to disable colors
*
* 15.08.2010 - v2.4.5 if you use this in CSS it's recommanded that you update to this version!
* Rewrite of the hole code to prevent double push.
* Changed: Instead of deleting or chaning the buttons return time, this plugin now locks all buttons for a certain time.
* Added: Func_butttons are now red if they are locked.
* Added: On plugin unload all buttons return to their normal behavior.
*
* 19.07.2010 - v1.2.0
* Fixed in CSS that round_start event is setting back the old values from the map.
*
* v1.1.0
* Added sm_nodoublepush_triggertime to prevent no trap buttons are only once pushable.
*
* v1.0.0
* Public release.
*
*
* Thank you Berni and SourceMod/AlliedModders-Team
* Thank you thetwistedpanda for letting me know about that the buttons won't keep their assigned time.
*/
Download: