Send property On Game Close?

Basically im making a lan game and i would like to send a property to let the server know that the client has closed the game. Is it possible to do some kind of action or a quick script just before the game closes?