We can use If only ... I to say that we would like things to be different.
It means the same as I wish , but is more emphatic.
We use the same tenses after if only as after I wish:
a. past to talk about the present If only I knew more people!
If only I was better-looking!
In a formal style, we can use were instead of was.
If only I were better-looking!
b. would to refer to the future
If only it would stop raining! '
If only somebody would smile!
c. past perfect (had + past participle) to refer to the past
If only she hadn't told the police, everything would ha ve been all right.