You need to create a loop that checks if the player is in Jail and what to do based upon that, if they log out, then they will just spawn again.
I know how to make it check if the player still has [pJailed] == 1 at spawn and if they do they'll spawn at the jail but I don't know how to make the thing that will free them when the time ends.