The dplay_id on a server is always 0. On a client it's set when it joined. Afterwards it is not changed anymore, so the engine itself can not set it to 0. Maybe it's some function in your script? You could determine that when you check dplay_id every frame, and post a message when it becomes 0.