Defuse Mistake 1.4 for Counter-strike and Condition Zero by Redshift187
This is my first plugin. I would like to thank VEN for the code on when the bomb defusing was cancelled and how to properly trigger the explosion, Hebusletroll for snippets I borrowed from Time To Defuse, SweatyBanana for snippets I borrowed from Random Bomb Timer, The Specialist for snippets I borrowed from Cut The Right Wire and Cheap Suit for snippets I borrowed from C4 Timer.
Feel free to use any of this code in your own plugin, as long as you mention me. If you have any questions about what any of it does, feel free to ask (I'll do my best).
The idea behind this plugin is that persons trying to defuse without a kit might make a mistake and detonate the bomb early.
This plugin will pick a random number between 1 and dfmis_odds X 10. This will give a possibility of dfmis_odds percent chance that the number is less than the time to defuse without a kit. If you are defusing without a kit, the bomb will explode the random number of seconds into the defuse. If you stop and restart the defuse, the random number is chosen again (just to make you second guess yourself! <evil grin>).
Use:
dfmis_odds (1-100) - default 10, sets the odds that the bomb will detonate during defuse (set to 0 to disable)
Changelog:
1.4 - 03/30/08 Odds calculation mistake, it was 100% all the time.
1.3 - 03/29/08 Fixed odds calculation. Now it really is a percent chance. Converted engine code to fakemeta.
1.2 - Fixed problem with bomb sometimes exploding immediately after defused
1.1 - Updated re: suggestions by Emp`
1.0 - Original