During early development stages of GTA San Andreas, Rockstar planned to implement safes, which a player was able to crack. There are only unused models and text strings left in the game.
This script completely restores this feature unfinished by developers. Safes are located in every house Carl can invade during burglary mission. Approach the safe to start cracking it.
Carefully rotate the tumbler right or left via directional buttons, or analog sticks - in case you play with gamepad. Listen carefully to the sounds, clicks and vibrations (which are only present to gamepad users) caused by the safe. Eventually, you will find out a four-digit code which should be written on an on-screen keyboard in order to gain access to the money stored in the safe.