(This article is also relevant to demos, which work much the same way.)
Synchronized events are always triggered on all computers at the same time and under the same conditions, triggered on specific in-game situations. Unsynchronized events, however, are usually triggered on only the local computer so the CON code doesn't have to work the same way on different computers. These events are usually display-related or affect only the local computer.
In order to understand the interaction of random occurrences and unsynchronized events, you need to understand two things:
Every time something "random" happens in the game, it must happen the same way on all of the computers. Since all of them start with the same number and go through the same sequence of numbers at the same times, everything works. But if one computer calls ifrnd or randvar while the others do not, it ends up at a different place in the random sequence. The next time something random happens in the game, it occurs differently on this computer, causing the game to become out-of-sync. (This isn't even the worst case: Imagine each computer on a wildly different place in the sequence, resulting in almost no correlation between what each player sees in the game.)
Unsynchronized events are not guaranteed to happen at the same time, or at all, between different computers in a multiplayer game. Therefore, it is not safe to use ifrnd or randvar in them, because they could end up out of sequence. It is also not safe to do anything affecting gameplay in these events for the same reason. Displayrand is an exception because it does not affect the sequence used by the other commands. Therefore it is safe to use in unsynchronized events. It should not be used in other events because that would cause the same problems outlined above.
DOs and DON'Ts: