The contingency of the crates is checked with the server time. Mostly random generated things are going to the number of the milliseconds.
For example: You going to buy some crates which contains the amount of numbers what you win at which time. If you starting to spin the counter of the server stops for a milsecond and looks which time you got. If the number of the time identical with the one which is deposited behind the weapon, you will get it. If not, ye you will get the rest.
But it's just a theorie, but im sure thats how it works :)