clamp <gamevar> <min> <max>
Will lock <gamevar> to the minimum/maximum values set if it tries to exceed them.