1. You could destroy the player or his aircraft. Place a trigger with
Code:
* zero a axis and zero b axis
* repeated
* condition: ((position (vehicle player)) select 2) > XXX
* activation: (vehicle player) setdamage 1;
2. You can push down the aircraft when it exceeds a certain height. Place a trigger with
Code:
* zero a axis and zero b axis
* repeated
* condition: ((position (vehicle player)) select 2) > XXX
* activation: (vehicle player) setpos [(position (vehicle player)) select 0, (position (vehicle player)) select 1, (position (vehicle player)) select 2)-20];
Replace XXX by your custom height.
You may also want to include a warning hint that shows up before the altitude limit is reached:
Code:
* zero a axis and zero b axis
* repeated
* condition: ((position (vehicle player)) select 2) > XXX
* activation: 0 cuttext ["THE MAXIMUM ALTITUDE IS 300 METRES","plain down",0];
XXX might be "limit - 100" or "limit - 50" or whatever you think to be useful.
Remind, when you fly over a mountain, your current altitude raises instantly to a much higher value from one second to the other when you have passed the mountain.