Simple step plot

I want to plot a discontinuous step surface. I entered this plot statement:

Plot3D[{if[x > 0, x = 0, x = 1]}, {x, 2, -2}, {y, 2, -2}]

All I get is an empty box. What went wrong?

Try with If and not if
But may be better to use Piecewise

Clear[x, y]
f[x_] := Piecewise[{{0, x > 0}, {1, True}}];
Plot3D[f[x], {x, 2, -2}, {y, 2, -2}, Exclusions -> None]

Perfect! Thank you Nasser Abbasi!

The Problem is nothing but, you have used small ā€œiā€ instead of capital ā€œIā€ for If function. Its working well.