Pressure of the hot gas in simulations of galaxy clusters