So you understand what means '!' ? The check means : "If player with id as index is not connected".
You use that everywhere and of course it can't work because you do things only when player is disconnected.
Thanks!
Just copied "if(!is_user_connected(id))" from another plugin source and didn't notice "!" in front of it.
Now it works Thanks!