Keypad Cracker 2.0

Modified from keypad cracker 1.0

Originally written by Chief Tiger
Modified by khm (aka HellRazor)


How to Install:
Place this addon folder in:
<Steam Install Path>\steamapps&lt;Your Steam Account Name>\garrysmod\garrysmod\addons\

I have been playing on DarkRP servers lately and after being raided by 3 different groups within the time span of 5 minutes, I have come to the conclusion that the keypad cracker 1.0 that most servers use is way too powerful. So I modified it so that its less powerful but can be easily adjusted if the admin feels the values I have chosen aren’t quite right. Also while i was at it I figured i would fix some bugs I had noticed and add support for cracking wire keypads so that admins don’t have to restrict players to normal ones.

Added support for cracking Wire Keypads
The Keypad Cracker will now crack Wire Keypads just like normal Keypads

Added random time to crack
The amount of time it takes to crack a keypad is now a random number between 30 and 60 seconds

Added chance to fail
1 out of every 4 tries will now fail and trigger the keypads access denied function

Modified maximum operational distance
The maximum distance the cracker can be from the keypad has been reduced from 300 to 50 so that
one has to be within normal usage range instead of on the other side of the room

Fixed HUD drawing bug
Fixed a bug where the HUD wouldn’t always draw the cracking progress bar

Fixed crack transfer bug
Fixed a bug where a player could start cracking on one keypad and end on another
Example: Using an E2 chip one could float a keypad in front of them and start their crack on that.
Then run over to the keypad they really wanted to crack, move the floating keypad out of
the way just as the crack finished, and crack the new keypad without having to be within its
range or look at it for the required time.

Fixed Advanced Keypad Cracking bug
Fixed a bug where it would treat an Advanced Keypad like a Simple Keypad when cracked

You should make it fail at a random try, like 33.333% chance of failing.

it dose fail randomly, but currently it fails 25% of the time instead of 33.333%. if you want it to fail 33.333% of the time, i set it up so that its easy to go into the code and change it

just replace:
SWEP.KeypadCrackOdds = {1, 4}
SWEP.KeypadCrackOdds = {1, 3}

although now that i look at it KeypadCrackOdds should probably be KeypadCrackFailOdds to increase clarity

ok, i changed the name of that variable from KeypadCrackOdds to KeypadCrackFailOdds and added some comments and examples on how to use it

I cant get it to work in-game. It wont cooperate with my Fading Door…