COUNTER falstart_car = 0
COUNTER start_end = 0
COUNTER sprawdzenie = 0
COUNTER start = 0
COUNTER stop = 0
COUNTER liczenie = 0
COUNTER falstart = 0

COUNTER pozycja_1 = 0
COUNTER pozycja_2 = 0
COUNTER pozycja_3 = 0
COUNTER pozycja_4 = 0

COUNTER fake_nic
ONSCREEN_COUNTER screen_fake
 
loading_ps:
SET loop = 0
CHANGE_BLOCK SIDE ( 100 , 188 , 5) LEFT WALL BULLET FLAT NOT_FLIP 0 75
CHANGE_BLOCK SIDE ( 100 , 188 , 5) RIGHT WALL BULLET FLAT FLIP 0 75
CHANGE_BLOCK SIDE ( 100 , 187 , 5) LEFT WALL BULLET FLAT FLIP 0 75
CHANGE_BLOCK SIDE ( 100 , 187 , 5) RIGHT WALL BULLET FLAT NOT_FLIP 0 75



WHILE_EXEC (loading = 5)


//MESSAGES
IF (pyramid = 15)
 IF (position_start_bmw = 4)
  DISPLAY_BRIEF ( 3040 ) // "#BMW Sauber# - start position - #4#.
  SET pyramid = 16
 ENDIF  
 IF (position_start_ferrari = 4)
  DISPLAY_BRIEF ( 3044 ) // "#Ferrari# - start position - #4#.
  SET pyramid = 16
 ENDIF   
 IF (position_start_brawn = 4)
  DISPLAY_BRIEF ( 3048 ) // "#Brawn GP# - start position - #4#.
  SET pyramid = 16
 ENDIF   
 IF (position_start_redbull = 4)
  DISPLAY_BRIEF ( 3052 ) // "#Redbull# - start position - #4#.
  SET pyramid = 16
 ENDIF  
 IF (position_start_mclaren = 4)
  DISPLAY_BRIEF ( 3056 ) // "#Mclaren# - start position - #4#.
  SET pyramid = 16
 ENDIF   
 IF (position_start_renault = 4)
  DISPLAY_BRIEF ( 3060 ) // "#Renault# - start position - #4#.
  SET pyramid = 16
 ENDIF
ENDIF

IF (pyramid = 16)
 IF (position_start_bmw = 3)
  DISPLAY_BRIEF ( 3039 ) // "#BMW Sauber# - start position - #3#.
  SET pyramid = 17
 ENDIF 
 IF (position_start_ferrari = 3)
  DISPLAY_BRIEF ( 3043 ) // "#Ferrari# - start position - #3#.
  SET pyramid = 17
 ENDIF 
 IF (position_start_brawn = 3)
  DISPLAY_BRIEF ( 3047 ) // "#Brawn GP# - start position - #3#.
  SET pyramid = 17
 ENDIF 
 IF (position_start_redbull = 3)
  DISPLAY_BRIEF ( 3051 ) // "#Redbull# - start position - #3#.
  SET pyramid = 17
 ENDIF  
 IF (position_start_mclaren = 3)
  DISPLAY_BRIEF ( 3055 ) // "#Mclaren# - start position - #3#.
  SET pyramid = 17
 ENDIF 
 IF (position_start_renault = 3)
  DISPLAY_BRIEF ( 3059 ) // "#Renault# - start position - #3#.
  SET pyramid = 17
 ENDIF 
ENDIF

IF (pyramid = 17) 
 IF (position_start_bmw = 2)
  DISPLAY_BRIEF ( 3038 ) // "#BMW Sauber# - start position - #2#.
  SET pyramid = 18
 ENDIF 
 IF (position_start_ferrari = 2)
  DISPLAY_BRIEF ( 3042 ) // "#Ferrari# - start position - #2#.
  SET pyramid = 18
 ENDIF 
 IF (position_start_brawn = 2)
  DISPLAY_BRIEF ( 3046 ) // "#Brawn GP# - start position - #2#.
  SET pyramid = 18
 ENDIF 
 IF (position_start_redbull = 2)
  DISPLAY_BRIEF ( 3050 ) // "#Redbull# - start position - #2#.
  SET pyramid = 18
 ENDIF 
 IF (position_start_mclaren = 2)
  DISPLAY_BRIEF ( 3054 ) // "#Mclaren# - start position - #2#.
  SET pyramid = 18
 ENDIF 
 IF (position_start_renault = 2)
  DISPLAY_BRIEF ( 3058 ) // "#Renault# - start position - #2#.
  SET pyramid = 18
 ENDIF 
ENDIF
 
IF (pyramid = 18) 
 IF (position_start_bmw = 1)
  DISPLAY_BRIEF ( 3037 ) // "#BMW Sauber# - start position - #1#.
  SET pyramid = 19
 ENDIF
 IF (position_start_ferrari = 1)
  DISPLAY_BRIEF ( 3041 ) // "#Ferrari# - start position - #1#.
  SET pyramid = 19
 ENDIF
 IF (position_start_brawn = 1)
  DISPLAY_BRIEF ( 3045 ) // "#Brawn GP# - start position - #1#.
  SET pyramid = 19
 ENDIF
 IF (position_start_redbull = 1)
  DISPLAY_BRIEF ( 3049 ) // "#Redbull# - start position - #1#.
  SET pyramid = 19
 ENDIF
 IF (position_start_mclaren = 1)
  DISPLAY_BRIEF ( 3053 ) // "#Mclaren# - start position - #1#.
  SET pyramid = 19
 ENDIF
 IF (position_start_renault = 1)
  DISPLAY_BRIEF ( 3057 ) // "#Renault# - start position - #1#.
  SET pyramid = 19
 ENDIF
ENDIF 

IF (pyramid = 15)
 IF ( pseudo_count = 3 )
  SET pyramid = 16
 ENDIF
 IF ( pseudo_count = 2 )
  SET pyramid = 17
 ENDIF
 IF ( pseudo_count = 1 )
  SET pyramid = 18
 ENDIF
 IF ( pseudo_count = 0 )
  SET loading = 6
  SET main = 0
  RETURN
 ENDIF
ENDIF

// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXX                         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXX      POSITION   1       XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXX                         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


IF ( position_start_bmw = 1 )
 IF ((((IS_CAR_IN_BLOCK ( gt1_bmwsauber , 102.25 , 188.3 , 4.0 , 0.4 , 0.3 ))
 AND (IS_CAR_IN_BLOCK ( gt1_bmwsauber , 103.25 , 188.7 , 4.0 , 0.4 , 0.3 )))
 AND (NOT(CHECK_CAR_SPEED (gt1_bmwsauber , 1))))
 AND ( start_end = 0 ))
  SET pozycja_1 = 1
  CHANGE_BLOCK LID  ( 102  ,  188 ,  3) NOT_FLAT NOT_FLIP  0 90 89
 ENDIF
 IF ((CHECK_CAR_SPEED (gt1_bmwsauber , 1))
 AND (pozycja_1 = 1))
  IF ((falstart_car = 0)
  AND (start = 1))
   SET falstart_car = 1
  ENDIF
  CHANGE_BLOCK LID  ( 102  ,  188 ,  3) NOT_FLAT NOT_FLIP  0 90 72
  SET pozycja_1 = 0
 ENDIF
ENDIF

IF ( position_start_ferrari = 1 )
 IF ((((IS_CAR_IN_BLOCK ( gt1_ferrari , 102.25 , 188.3 , 4.0 , 0.4 , 0.3 ))
 AND (IS_CAR_IN_BLOCK ( gt1_ferrari , 103.25 , 188.7 , 4.0 , 0.4 , 0.3 )))
 AND (NOT(CHECK_CAR_SPEED (gt1_ferrari , 1))))
 AND ( start_end = 0 ))
  SET pozycja_1 = 1
  CHANGE_BLOCK LID  ( 102  ,  188 ,  3) NOT_FLAT NOT_FLIP  0 90 89
 ENDIF
 IF ((CHECK_CAR_SPEED (gt1_ferrari , 1))
 AND (pozycja_1 = 1))
  IF ((falstart_car = 0)
  AND (start = 1))
   SET falstart_car = 2
  ENDIF
  CHANGE_BLOCK LID  ( 102  ,  188 ,  3) NOT_FLAT NOT_FLIP  0 90 72
  SET pozycja_1 = 0
 ENDIF
ENDIF

IF ( position_start_brawn = 1 )
 IF ((((IS_CAR_IN_BLOCK ( gt1_brawn , 102.25 , 188.3 , 4.0 , 0.4 , 0.3 ))
 AND (IS_CAR_IN_BLOCK ( gt1_brawn , 103.25 , 188.7 , 4.0 , 0.4 , 0.3 )))
 AND (NOT(CHECK_CAR_SPEED (gt1_brawn , 1))))
 AND ( start_end = 0 ))
  SET pozycja_1 = 1
  CHANGE_BLOCK LID  ( 102  ,  188 ,  3) NOT_FLAT NOT_FLIP  0 90 89
 ENDIF
 IF ((CHECK_CAR_SPEED (gt1_brawn , 1))
 AND (pozycja_1 = 1))
  IF ((falstart_car = 0)
  AND (start = 1))
   SET falstart_car = 3
  ENDIF
  CHANGE_BLOCK LID  ( 102  ,  188 ,  3) NOT_FLAT NOT_FLIP  0 90 72
  SET pozycja_1 = 0
 ENDIF
ENDIF

IF ( position_start_redbull = 1 )
 IF ((((IS_CAR_IN_BLOCK ( gt1_redbull , 102.25 , 188.3 , 4.0 , 0.4 , 0.3 ))
 AND (IS_CAR_IN_BLOCK ( gt1_redbull , 103.25 , 188.7 , 4.0 , 0.4 , 0.3 )))
 AND (NOT(CHECK_CAR_SPEED (gt1_redbull , 1))))
 AND ( start_end = 0 ))
  SET pozycja_1 = 1
  CHANGE_BLOCK LID  ( 102  ,  188 ,  3) NOT_FLAT NOT_FLIP  0 90 89
 ENDIF
 IF ((CHECK_CAR_SPEED (gt1_redbull , 1))
 AND (pozycja_1 = 1))
  IF ((falstart_car = 0)
  AND (start = 1))
   SET falstart_car = 4
  ENDIF
  CHANGE_BLOCK LID  ( 102  ,  188 ,  3) NOT_FLAT NOT_FLIP  0 90 72
  SET pozycja_1 = 0
 ENDIF
ENDIF

IF ( position_start_mclaren = 1 )
 IF ((((IS_CAR_IN_BLOCK ( gt1_mclaren , 102.25 , 188.3 , 4.0 , 0.4 , 0.3 ))
 AND (IS_CAR_IN_BLOCK ( gt1_mclaren , 103.25 , 188.7 , 4.0 , 0.4 , 0.3 )))
 AND (NOT(CHECK_CAR_SPEED (gt1_mclaren , 1))))
 AND ( start_end = 0 ))
  SET pozycja_1 = 1
  CHANGE_BLOCK LID  ( 102  ,  188 ,  3) NOT_FLAT NOT_FLIP  0 90 89
 ENDIF
 IF ((CHECK_CAR_SPEED (gt1_mclaren , 1))
 AND (pozycja_1 = 1))
  IF ((falstart_car = 0)
  AND (start = 1))
   SET falstart_car = 5
  ENDIF
  CHANGE_BLOCK LID  ( 102  ,  188 ,  3) NOT_FLAT NOT_FLIP  0 90 72
  SET pozycja_1 = 0
 ENDIF
ENDIF

IF ( position_start_renault = 1 )
 IF ((((IS_CAR_IN_BLOCK ( gt1_renault , 102.25 , 188.3 , 4.0 , 0.4 , 0.3 ))
 AND (IS_CAR_IN_BLOCK ( gt1_renault , 103.25 , 188.7 , 4.0 , 0.4 , 0.3 )))
 AND (NOT(CHECK_CAR_SPEED (gt1_renault , 1))))
 AND ( start_end = 0 ))
  SET pozycja_1 = 1
  CHANGE_BLOCK LID  ( 102  ,  188 ,  3) NOT_FLAT NOT_FLIP  0 90 89
 ENDIF
 IF ((CHECK_CAR_SPEED (gt1_renault , 1))
 AND (pozycja_1 = 1))
  IF ((falstart_car = 0)
  AND (start = 1))
   SET falstart_car = 6
  ENDIF
  CHANGE_BLOCK LID  ( 102  ,  188 ,  3) NOT_FLAT NOT_FLIP  0 90 72
  SET pozycja_1 = 0
 ENDIF
ENDIF

// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXX                         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXX      POSITION   2       XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXX                         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


IF ( position_start_bmw = 2 )
 IF ((((IS_CAR_IN_BLOCK ( gt1_bmwsauber , 104.25 , 186.3 , 4.0 , 0.4 , 0.3 ))
 AND (IS_CAR_IN_BLOCK ( gt1_bmwsauber , 105.25 , 186.7 , 4.0 , 0.4 , 0.3 )))
 AND (NOT(CHECK_CAR_SPEED (gt1_bmwsauber , 1))))
 AND ( start_end = 0 ))
  SET pozycja_2 = 1
  CHANGE_BLOCK LID  ( 104  ,  186 ,  3) NOT_FLAT NOT_FLIP  0 90 89
 ENDIF
 IF ((CHECK_CAR_SPEED (gt1_bmwsauber , 1))
 AND (pozycja_2 = 1))
  IF ((falstart_car = 0)
  AND (start = 1))
   SET falstart_car = 1
  ENDIF
  CHANGE_BLOCK LID  ( 104  ,  186 ,  3) NOT_FLAT NOT_FLIP  0 90 72
  SET pozycja_2 = 0
 ENDIF
ENDIF

IF ( position_start_ferrari = 2 )
 IF ((((IS_CAR_IN_BLOCK ( gt1_ferrari , 104.25 , 186.3 , 4.0 , 0.4 , 0.3 ))
 AND (IS_CAR_IN_BLOCK ( gt1_ferrari , 105.25 , 186.7 , 4.0 , 0.4 , 0.3 )))
 AND (NOT(CHECK_CAR_SPEED (gt1_ferrari , 1))))
 AND ( start_end = 0 ))
  SET pozycja_2 = 1
  CHANGE_BLOCK LID  ( 104  ,  186 ,  3) NOT_FLAT NOT_FLIP  0 90 89
 ENDIF
 IF ((CHECK_CAR_SPEED (gt1_ferrari , 1))
 AND (pozycja_2 = 1))
  IF ((falstart_car = 0)
  AND (start = 1))
   SET falstart_car = 2
  ENDIF
  CHANGE_BLOCK LID  ( 104  ,  186 ,  3) NOT_FLAT NOT_FLIP  0 90 72
  SET pozycja_2 = 0
 ENDIF
ENDIF

IF ( position_start_brawn = 2 )
 IF ((((IS_CAR_IN_BLOCK ( gt1_brawn , 104.25 , 186.3 , 4.0 , 0.4 , 0.3 ))
 AND (IS_CAR_IN_BLOCK ( gt1_brawn , 105.25 , 186.7 , 4.0 , 0.4 , 0.3 )))
 AND (NOT(CHECK_CAR_SPEED (gt1_brawn , 1))))
 AND ( start_end = 0 ))
  SET pozycja_2 = 1
  CHANGE_BLOCK LID  ( 104  ,  186 ,  3) NOT_FLAT NOT_FLIP  0 90 89
 ENDIF
 IF ((CHECK_CAR_SPEED (gt1_brawn , 1))
 AND (pozycja_2 = 1))
  IF ((falstart_car = 0)
  AND (start = 1))
   SET falstart_car = 3
  ENDIF
  CHANGE_BLOCK LID  ( 104  ,  186 ,  3) NOT_FLAT NOT_FLIP  0 90 72
  SET pozycja_2 = 0
 ENDIF
ENDIF

IF ( position_start_redbull = 2 )
 IF ((((IS_CAR_IN_BLOCK ( gt1_redbull , 104.25 , 186.3 , 4.0 , 0.4 , 0.3 ))
 AND (IS_CAR_IN_BLOCK ( gt1_redbull , 105.25 , 186.7 , 4.0 , 0.4 , 0.3 )))
 AND (NOT(CHECK_CAR_SPEED (gt1_redbull , 1))))
 AND ( start_end = 0 ))
  SET pozycja_2 = 1
  CHANGE_BLOCK LID  ( 104  ,  186 ,  3) NOT_FLAT NOT_FLIP  0 90 89
 ENDIF
 IF ((CHECK_CAR_SPEED (gt1_redbull , 1))
 AND (pozycja_2 = 1))
  IF ((falstart_car = 0)
  AND (start = 1))
   SET falstart_car = 4
  ENDIF
  CHANGE_BLOCK LID  ( 104  ,  186 ,  3) NOT_FLAT NOT_FLIP  0 90 72
  SET pozycja_2 = 0
 ENDIF
ENDIF

IF ( position_start_mclaren = 2 )
 IF ((((IS_CAR_IN_BLOCK ( gt1_mclaren , 104.25 , 186.3 , 4.0 , 0.4 , 0.3 ))
 AND (IS_CAR_IN_BLOCK ( gt1_mclaren , 105.25 , 186.7 , 4.0 , 0.4 , 0.3 )))
 AND (NOT(CHECK_CAR_SPEED (gt1_mclaren , 1))))
 AND ( start_end = 0 ))
  SET pozycja_2 = 1
  CHANGE_BLOCK LID  ( 104  ,  186 ,  3) NOT_FLAT NOT_FLIP  0 90 89
 ENDIF
 IF ((CHECK_CAR_SPEED (gt1_mclaren , 1))
 AND (pozycja_2 = 1))
  IF ((falstart_car = 0)
  AND (start = 1))
   SET falstart_car = 5
  ENDIF
  CHANGE_BLOCK LID  ( 104  ,  186 ,  3) NOT_FLAT NOT_FLIP  0 90 72
  SET pozycja_2 = 0
 ENDIF
ENDIF

IF ( position_start_renault = 2 )
 IF ((((IS_CAR_IN_BLOCK ( gt1_renault , 104.25 , 186.3 , 4.0 , 0.4 , 0.3 ))
 AND (IS_CAR_IN_BLOCK ( gt1_renault , 105.25 , 186.7 , 4.0 , 0.4 , 0.3 )))
 AND (NOT(CHECK_CAR_SPEED (gt1_renault , 1))))
 AND ( start_end = 0 ))
  SET pozycja_2 = 1
  CHANGE_BLOCK LID  ( 104  ,  186 ,  3) NOT_FLAT NOT_FLIP  0 90 89
 ENDIF
 IF ((CHECK_CAR_SPEED (gt1_renault , 1))
 AND (pozycja_2 = 1))
  IF ((falstart_car = 0)
  AND (start = 1))
   SET falstart_car = 6
  ENDIF
  CHANGE_BLOCK LID  ( 104  ,  186 ,  3) NOT_FLAT NOT_FLIP  0 90 72
  SET pozycja_2 = 0
 ENDIF
ENDIF

// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXX                         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXX      POSITION   3       XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXX                         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


IF ( position_start_bmw = 3 )
 IF ((((IS_CAR_IN_BLOCK ( gt1_bmwsauber , 107.25 , 188.3 , 4.0 , 0.4 , 0.3 ))
 AND (IS_CAR_IN_BLOCK ( gt1_bmwsauber , 108.25 , 188.7 , 4.0 , 0.4 , 0.3 )))
 AND (NOT(CHECK_CAR_SPEED (gt1_bmwsauber , 1))))
 AND ( start_end = 0 ))
  SET pozycja_3 = 1
  CHANGE_BLOCK LID  ( 107  ,  188 ,  3) NOT_FLAT NOT_FLIP  0 90 89
 ENDIF
 IF ((CHECK_CAR_SPEED (gt1_bmwsauber , 1))
 AND (pozycja_3 = 1))
  IF ((falstart_car = 0)
  AND (start = 1))
   SET falstart_car = 1
  ENDIF
  CHANGE_BLOCK LID  ( 107  ,  188 ,  3) NOT_FLAT NOT_FLIP  0 90 72
  SET pozycja_3 = 0
 ENDIF
ENDIF

IF ( position_start_ferrari = 3 )
 IF ((((IS_CAR_IN_BLOCK ( gt1_ferrari , 107.25 , 188.3 , 4.0 , 0.4 , 0.3 ))
 AND (IS_CAR_IN_BLOCK ( gt1_ferrari , 108.25 , 188.7 , 4.0 , 0.4 , 0.3 )))
 AND (NOT(CHECK_CAR_SPEED (gt1_ferrari , 1))))
 AND ( start_end = 0 ))
  SET pozycja_3 = 1
  CHANGE_BLOCK LID  ( 107  ,  188 ,  3) NOT_FLAT NOT_FLIP  0 90 89
 ENDIF
 IF ((CHECK_CAR_SPEED (gt1_ferrari , 1))
 AND (pozycja_3 = 1))
  IF ((falstart_car = 0)
  AND (start = 1))
   SET falstart_car = 2
  ENDIF
  CHANGE_BLOCK LID  ( 107  ,  188 ,  3) NOT_FLAT NOT_FLIP  0 90 72
  SET pozycja_3 = 0
 ENDIF
ENDIF

IF ( position_start_brawn = 3 )
 IF ((((IS_CAR_IN_BLOCK ( gt1_brawn , 107.25 , 188.3 , 4.0 , 0.4 , 0.3 ))
 AND (IS_CAR_IN_BLOCK ( gt1_brawn , 108.25 , 188.7 , 4.0 , 0.4 , 0.3 )))
 AND (NOT(CHECK_CAR_SPEED (gt1_brawn , 1))))
 AND ( start_end = 0 ))
  SET pozycja_3 = 1
  CHANGE_BLOCK LID  ( 107  ,  188 ,  3) NOT_FLAT NOT_FLIP  0 90 89
 ENDIF
 IF ((CHECK_CAR_SPEED (gt1_brawn , 1))
 AND (pozycja_3 = 1))
  IF ((falstart_car = 0)
  AND (start = 1))
   SET falstart_car = 3
  ENDIF
  CHANGE_BLOCK LID  ( 107  ,  188 ,  3) NOT_FLAT NOT_FLIP  0 90 72
  SET pozycja_3 = 0
 ENDIF
ENDIF

IF ( position_start_redbull = 3 )
 IF ((((IS_CAR_IN_BLOCK ( gt1_redbull , 107.25 , 188.3 , 4.0 , 0.4 , 0.3 ))
 AND (IS_CAR_IN_BLOCK ( gt1_redbull , 108.25 , 188.7 , 4.0 , 0.4 , 0.3 )))
 AND (NOT(CHECK_CAR_SPEED (gt1_redbull , 1))))
 AND ( start_end = 0 ))
  SET pozycja_3 = 1
  CHANGE_BLOCK LID  ( 107  ,  188 ,  3) NOT_FLAT NOT_FLIP  0 90 89
 ENDIF
 IF ((CHECK_CAR_SPEED (gt1_redbull , 1))
 AND (pozycja_3 = 1))
  IF ((falstart_car = 0)
  AND (start = 1))
   SET falstart_car = 4
  ENDIF
  CHANGE_BLOCK LID  ( 107  ,  188 ,  3) NOT_FLAT NOT_FLIP  0 90 72
  SET pozycja_3 = 0
 ENDIF
ENDIF

IF ( position_start_mclaren = 3 )
 IF ((((IS_CAR_IN_BLOCK ( gt1_mclaren , 107.25 , 188.3 , 4.0 , 0.4 , 0.3 ))
 AND (IS_CAR_IN_BLOCK ( gt1_mclaren , 108.25 , 188.7 , 4.0 , 0.4 , 0.3 )))
 AND (NOT(CHECK_CAR_SPEED (gt1_mclaren , 1))))
 AND ( start_end = 0 ))
  SET pozycja_3 = 1
  CHANGE_BLOCK LID  ( 107  ,  188 ,  3) NOT_FLAT NOT_FLIP  0 90 89
 ENDIF
 IF ((CHECK_CAR_SPEED (gt1_mclaren , 1))
 AND (pozycja_3 = 1))
  IF ((falstart_car = 0)
  AND (start = 1))
   SET falstart_car = 5
  ENDIF
  CHANGE_BLOCK LID  ( 107  ,  188 ,  3) NOT_FLAT NOT_FLIP  0 90 72
  SET pozycja_3 = 0
 ENDIF
ENDIF

IF ( position_start_renault = 3 )
 IF ((((IS_CAR_IN_BLOCK ( gt1_renault , 107.25 , 188.3 , 4.0 , 0.4 , 0.3 ))
 AND (IS_CAR_IN_BLOCK ( gt1_renault , 108.25 , 188.7 , 4.0 , 0.4 , 0.3 )))
 AND (NOT(CHECK_CAR_SPEED (gt1_renault , 1))))
 AND ( start_end = 0 ))
  SET pozycja_3 = 1
  CHANGE_BLOCK LID  ( 107  ,  188 ,  3) NOT_FLAT NOT_FLIP  0 90 89
 ENDIF
 IF ((CHECK_CAR_SPEED (gt1_renault , 1))
 AND (pozycja_3 = 1))
  IF ((falstart_car = 0)
  AND (start = 1))
   SET falstart_car = 6
  ENDIF
  CHANGE_BLOCK LID  ( 107  ,  188 ,  3) NOT_FLAT NOT_FLIP  0 90 72
  SET pozycja_3 = 0
 ENDIF
ENDIF

// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXX                         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXX      POSITION   4       XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXX                         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


IF ( position_start_bmw = 4 )
 IF ((((IS_CAR_IN_BLOCK ( gt1_bmwsauber , 109.25 , 186.3 , 4.0 , 0.4 , 0.3 ))
 AND (IS_CAR_IN_BLOCK ( gt1_bmwsauber , 110.25 , 186.7 , 4.0 , 0.4 , 0.3 )))
 AND (NOT(CHECK_CAR_SPEED (gt1_bmwsauber , 1))))
 AND ( start_end = 0 ))
  SET pozycja_4 = 1
  CHANGE_BLOCK LID  ( 109  ,  186 ,  3) NOT_FLAT NOT_FLIP  0 90 89
 ENDIF
 IF ((CHECK_CAR_SPEED (gt1_bmwsauber , 1))
 AND (pozycja_4 = 1))
  IF ((falstart_car = 0)
  AND (start = 1))
   SET falstart_car = 1
  ENDIF
  CHANGE_BLOCK LID  ( 109  ,  186 ,  3) NOT_FLAT NOT_FLIP  0 90 72
  SET pozycja_4 = 0
 ENDIF
ENDIF

IF ( position_start_ferrari = 4 )
 IF ((((IS_CAR_IN_BLOCK ( gt1_ferrari , 109.25 , 186.3 , 4.0 , 0.4 , 0.3 ))
 AND (IS_CAR_IN_BLOCK ( gt1_ferrari , 110.25 , 186.7 , 4.0 , 0.4 , 0.3 )))
 AND (NOT(CHECK_CAR_SPEED (gt1_ferrari , 1))))
 AND ( start_end = 0 ))
  SET pozycja_4 = 1
  CHANGE_BLOCK LID  ( 109  ,  186 ,  3) NOT_FLAT NOT_FLIP  0 90 89
 ENDIF
 IF ((CHECK_CAR_SPEED (gt1_ferrari , 1))
 AND (pozycja_4 = 1))
  IF ((falstart_car = 0)
  AND (start = 1))
   SET falstart_car = 2
  ENDIF
  CHANGE_BLOCK LID  ( 109  ,  186 ,  3) NOT_FLAT NOT_FLIP  0 90 72
  SET pozycja_4 = 0
 ENDIF
ENDIF

IF ( position_start_brawn = 4 )
 IF ((((IS_CAR_IN_BLOCK ( gt1_brawn , 109.25 , 186.3 , 4.0 , 0.4 , 0.3 ))
 AND (IS_CAR_IN_BLOCK ( gt1_brawn , 110.25 , 186.7 , 4.0 , 0.4 , 0.3 )))
 AND (NOT(CHECK_CAR_SPEED (gt1_brawn , 1))))
 AND ( start_end = 0 ))
  SET pozycja_4 = 1
  CHANGE_BLOCK LID  ( 109  ,  186 ,  3) NOT_FLAT NOT_FLIP  0 90 89
 ENDIF
 IF ((CHECK_CAR_SPEED (gt1_brawn , 1))
 AND (pozycja_4 = 1))
  IF ((falstart_car = 0)
  AND (start = 1))
   SET falstart_car = 3
  ENDIF
  CHANGE_BLOCK LID  ( 109  ,  186 ,  3) NOT_FLAT NOT_FLIP  0 90 72
  SET pozycja_4 = 0
 ENDIF
ENDIF

IF ( position_start_redbull = 4 )
 IF ((((IS_CAR_IN_BLOCK ( gt1_redbull , 109.25 , 186.3 , 4.0 , 0.4 , 0.3 ))
 AND (IS_CAR_IN_BLOCK ( gt1_redbull , 110.25 , 186.7 , 4.0 , 0.4 , 0.3 )))
 AND (NOT(CHECK_CAR_SPEED (gt1_redbull , 1))))
 AND ( start_end = 0 ))
  SET pozycja_4 = 1
  CHANGE_BLOCK LID  ( 109  ,  186 ,  3) NOT_FLAT NOT_FLIP  0 90 89
 ENDIF
 IF ((CHECK_CAR_SPEED (gt1_redbull , 1))
 AND (pozycja_4 = 1))
  IF ((falstart_car = 0)
  AND (start = 1))
   SET falstart_car = 4
  ENDIF
  CHANGE_BLOCK LID  ( 109  ,  186 , 3) NOT_FLAT NOT_FLIP  0 90 72
  SET pozycja_4 = 0
 ENDIF
ENDIF

IF ( position_start_mclaren = 4 )
 IF ((((IS_CAR_IN_BLOCK ( gt1_mclaren , 109.25 , 186.3 , 4.0 , 0.4 , 0.3 ))
 AND (IS_CAR_IN_BLOCK ( gt1_mclaren , 110.25 , 186.7 , 4.0 , 0.4 , 0.3 )))
 AND (NOT(CHECK_CAR_SPEED (gt1_mclaren , 1))))
 AND ( start_end = 0 ))
  SET pozycja_4 = 1
  CHANGE_BLOCK LID  ( 109  ,  186 ,  3) NOT_FLAT NOT_FLIP  0 90 89
 ENDIF
 IF ((CHECK_CAR_SPEED (gt1_mclaren , 1))
 AND (pozycja_4 = 1))
  IF ((falstart_car = 0)
  AND (start = 1))
   SET falstart_car = 5
  ENDIF
  CHANGE_BLOCK LID  ( 109  ,  186 ,  3) NOT_FLAT NOT_FLIP  0 90 72
  SET pozycja_4 = 0
 ENDIF
ENDIF

IF ( position_start_renault = 4 )
 IF ((((IS_CAR_IN_BLOCK ( gt1_renault , 109.25 , 186.3 , 4.0 , 0.4 , 0.3 ))
 AND (IS_CAR_IN_BLOCK ( gt1_renault , 110.25 , 186.7 , 4.0 , 0.4 , 0.3 )))
 AND (NOT(CHECK_CAR_SPEED (gt1_renault , 1))))
 AND ( start_end = 0 ))
  SET pozycja_4 = 1
  CHANGE_BLOCK LID  ( 109  ,  186 ,  3) NOT_FLAT NOT_FLIP  0 90 89
 ENDIF
 IF ((CHECK_CAR_SPEED (gt1_renault , 1))
 AND (pozycja_4 = 1))
  IF ((falstart_car = 0)
  AND (start = 1))
   SET falstart_car = 6
  ENDIF
  CHANGE_BLOCK LID  ( 109  ,  186 ,  3) NOT_FLAT NOT_FLIP  0 90 72
  SET pozycja_4 = 0
 ENDIF
ENDIF

// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXX                             XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXX   KONFIGURACJA ILE TEAMOW   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXX                             XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

// 1 team

IF ((pseudo_count = 1)
AND (pozycja_1 = 1))
 SET falstart = 0
 SET stop = 0
 ++ sprawdzenie
ENDIF
IF ((pseudo_count = 1)
AND (pozycja_1 = 0))
 SET stop = 1
 SET sprawdzenie = 0
ENDIF

// 2 teamy

IF (((pseudo_count = 2)
AND (pozycja_1 = 1))
AND (pozycja_2 = 1))
 SET falstart = 0
 SET stop = 0
 ++ sprawdzenie
ENDIF
IF (pseudo_count = 2)
 IF ((pozycja_1 = 0)
 OR (pozycja_2 = 0))
  SET stop = 1
  SET sprawdzenie = 0
 ENDIF
ENDIF

// 3 teamy

IF ((((pseudo_count = 3)
AND (pozycja_1 = 1))
AND (pozycja_2 = 1))
AND (pozycja_3 = 1))
 SET falstart = 0
 SET stop = 0
 ++ sprawdzenie
ENDIF
IF (pseudo_count = 3)
 IF (((pozycja_1 = 0)
 OR (pozycja_2 = 0))
 OR (pozycja_3 = 0))
  SET stop = 1
  SET sprawdzenie = 0
 ENDIF
ENDIF

// 4 teamy

IF (((((pseudo_count = 4)
AND (pozycja_1 = 1))
AND (pozycja_2 = 1))
AND (pozycja_3 = 1))
AND (pozycja_4 = 1))
 SET falstart = 0
 SET stop = 0
 ++ sprawdzenie
ENDIF
IF (pseudo_count = 4)
 IF ((((pozycja_1 = 0)
 OR (pozycja_2 = 0))
 OR (pozycja_3 = 0))
 OR (pozycja_4 = 0)) 
  SET stop = 1
  SET sprawdzenie = 0
 ENDIF
ENDIF




// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXX                             XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXX    ODLICZANIE DO STARTU     XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXX                             XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX



IF ( sprawdzenie = 50)
 SET start = 1
ENDIF

IF (start = 1)
 ++ liczenie
ENDIF
 
IF (start = 1)
 IF (( liczenie < 151)
 AND (stop = 1))
  IF ( falstart = 0 )
   DISPLAY_MESSAGE ( 2997 ) // "FALSTART.
   SET falstart = 1
  ENDIF
  IF ( falstart_car = 1 )
   DISPLAY_BRIEF ( 3061 ) // "BMW Sauber falstarted.
   SET falstart_car = 0
  ENDIF  
  IF ( falstart_car = 2 )
   DISPLAY_BRIEF ( 3062 ) // "Ferrari falstarted.
   SET falstart_car = 0
  ENDIF
  IF ( falstart_car = 3 )
   DISPLAY_BRIEF ( 3063 ) // "Brawn GP falstarted.
   SET falstart_car = 0
  ENDIF
  IF ( falstart_car = 4 )
   DISPLAY_BRIEF ( 3064 ) // "Red Bull falstarted.
   SET falstart_car = 0
  ENDIF
  IF ( falstart_car = 5 )
   DISPLAY_BRIEF ( 3065 ) // "McLaren falstarted.
   SET falstart_car = 0
  ENDIF  
  IF ( falstart_car = 6 )
   DISPLAY_BRIEF ( 3066 ) // "Renault falstarted.
   SET falstart_car = 0
  ENDIF    
  CHANGE_BLOCK SIDE ( 100 , 188 , 5) LEFT WALL BULLET FLAT NOT_FLIP 0 75
  CHANGE_BLOCK SIDE ( 100 , 188 , 5) RIGHT WALL BULLET FLAT FLIP 0 75
  CHANGE_BLOCK SIDE ( 100 , 187 , 5) LEFT WALL BULLET FLAT FLIP 0 75
  CHANGE_BLOCK SIDE ( 100 , 187 , 5) RIGHT WALL BULLET FLAT NOT_FLIP 0 75
  SET start = 0
  SET liczenie = 0
 ENDIF
ENDIF

IF (liczenie = 1)
 DISPLAY_MESSAGE (2478)
 CHANGE_BLOCK SIDE ( 100 , 187 , 5) LEFT WALL BULLET FLAT FLIP 0 75
 CHANGE_BLOCK SIDE ( 100 , 187 , 5) RIGHT WALL BULLET FLAT NOT_FLIP 0 75
 CHANGE_BLOCK SIDE ( 100 , 188 , 5) LEFT WALL BULLET FLAT NOT_FLIP 0 76
 CHANGE_BLOCK SIDE ( 100 , 188 , 5) RIGHT WALL BULLET FLAT FLIP 0 76
ENDIF

IF (liczenie = 31)
 DISPLAY_MESSAGE (2477)
 CHANGE_BLOCK SIDE ( 100 , 188 , 5) LEFT WALL BULLET FLAT NOT_FLIP 0 77
 CHANGE_BLOCK SIDE ( 100 , 188 , 5) RIGHT WALL BULLET FLAT FLIP 0 77
ENDIF

IF (liczenie = 61)
 DISPLAY_MESSAGE (2476)
 CHANGE_BLOCK SIDE ( 100 , 188 , 5) LEFT WALL BULLET FLAT NOT_FLIP 0 78
 CHANGE_BLOCK SIDE ( 100 , 188 , 5) RIGHT WALL BULLET FLAT FLIP 0 78
 CHANGE_BLOCK SIDE ( 100 , 187 , 5) LEFT WALL BULLET FLAT NOT_FLIP 0 79
 CHANGE_BLOCK SIDE ( 100 , 187 , 5) RIGHT WALL BULLET FLAT FLIP 0 79
ENDIF

IF (liczenie = 91)
 DISPLAY_MESSAGE (2475)
 CHANGE_BLOCK SIDE ( 100 , 187 , 5) LEFT WALL BULLET FLAT NOT_FLIP 0 80
 CHANGE_BLOCK SIDE ( 100 , 187 , 5) RIGHT WALL BULLET FLAT FLIP 0 80
ENDIF

IF (liczenie = 121)
 DISPLAY_MESSAGE (2474)
 CHANGE_BLOCK SIDE ( 100 , 187 , 5) LEFT WALL BULLET FLAT FLIP 0 78
 CHANGE_BLOCK SIDE ( 100 , 187 , 5) RIGHT WALL BULLET FLAT NOT_FLIP 0 78
ENDIF

IF (liczenie = 150)
 DISPLAY_MESSAGE (2473)
 CHANGE_BLOCK SIDE ( 100 , 188 , 5) LEFT WALL BULLET FLAT NOT_FLIP 0 75
 CHANGE_BLOCK SIDE ( 100 , 188 , 5) RIGHT WALL BULLET FLAT FLIP 0 75
 CHANGE_BLOCK SIDE ( 100 , 187 , 5) LEFT WALL BULLET FLAT FLIP 0 75
 CHANGE_BLOCK SIDE ( 100 , 187 , 5) RIGHT WALL BULLET FLAT NOT_FLIP 0 75
 
 CHANGE_BLOCK LID  ( 102  ,  188 ,  3) NOT_FLAT NOT_FLIP  0 90 72 
 CHANGE_BLOCK LID  ( 104  ,  186 ,  3) NOT_FLAT NOT_FLIP  0 90 72
 CHANGE_BLOCK LID  ( 107  ,  188 ,  3) NOT_FLAT NOT_FLIP  0 90 72
 CHANGE_BLOCK LID  ( 109  ,  186 ,  3) NOT_FLAT NOT_FLIP  0 90 72
 SET start_end = 1
ENDIF
 
IF (start_end = 1) 
 // closing repaired place
 MAKE_DOOR_MANUAL ( door_re1 )
 MAKE_DOOR_MANUAL ( door_re2 )
 // logo black - white
 CHANGE_BLOCK LID ( 93 , 191 , 5 ) NOT_FLAT NOT_FLIP 0 0 208
 CHANGE_BLOCK LID ( 94 , 191 , 5 ) NOT_FLAT FLIP 0 0 208 
 
 CHANGE_BLOCK LID ( 110 , 191 , 5 ) NOT_FLAT NOT_FLIP 0 0 208
 CHANGE_BLOCK LID ( 111 , 191 , 5 ) NOT_FLAT FLIP 0 0 208 
 // closing start gate
 CHANGE_BLOCK SIDE ( 135 , 191 , 4) TOP WALL BULLET FLAT NOT_FLIP 0 181
 CHANGE_BLOCK SIDE ( 136 , 191 , 4) TOP WALL BULLET FLAT NOT_FLIP 0 181
 CHANGE_BLOCK SIDE ( 137 , 191 , 4) TOP WALL BULLET FLAT NOT_FLIP 0 181
 CHANGE_BLOCK SIDE ( 138 , 191 , 4) TOP WALL BULLET FLAT NOT_FLIP 0 181
 CHANGE_BLOCK SIDE ( 139 , 191 , 4) TOP WALL BULLET FLAT NOT_FLIP 0 181 
 // pitlane open
 CHANGE_BLOCK SIDE ( 101 , 174 , 4) BOTTOM NOT_WALL BULLET FLAT NOT_FLIP 0 976
 CHANGE_BLOCK SIDE ( 102 , 174 , 4) BOTTOM NOT_WALL BULLET FLAT NOT_FLIP 0 976
 CHANGE_BLOCK SIDE ( 103 , 174 , 4) BOTTOM NOT_WALL BULLET FLAT NOT_FLIP 0 976
 CHANGE_BLOCK SIDE ( 104 , 174 , 4) BOTTOM NOT_WALL BULLET FLAT NOT_FLIP 0 976
 
 CHANGE_BLOCK SIDE ( 109 , 174 , 4) BOTTOM NOT_WALL BULLET FLAT NOT_FLIP 0 976
 CHANGE_BLOCK SIDE ( 110 , 174 , 4) BOTTOM NOT_WALL BULLET FLAT NOT_FLIP 0 976
 CHANGE_BLOCK SIDE ( 111 , 174 , 4) BOTTOM NOT_WALL BULLET FLAT NOT_FLIP 0 976
 CHANGE_BLOCK SIDE ( 112 , 174 , 4) BOTTOM NOT_WALL BULLET FLAT NOT_FLIP 0 976 
 
 CHANGE_BLOCK SIDE ( 117 , 174 , 4) BOTTOM NOT_WALL BULLET FLAT NOT_FLIP 0 976
 CHANGE_BLOCK SIDE ( 118 , 174 , 4) BOTTOM NOT_WALL BULLET FLAT NOT_FLIP 0 976
 CHANGE_BLOCK SIDE ( 119 , 174 , 4) BOTTOM NOT_WALL BULLET FLAT NOT_FLIP 0 976
 CHANGE_BLOCK SIDE ( 120 , 174 , 4) BOTTOM NOT_WALL BULLET FLAT NOT_FLIP 0 976 
 
 CHANGE_BLOCK SIDE ( 125 , 174 , 4) BOTTOM NOT_WALL BULLET FLAT NOT_FLIP 0 976
 CHANGE_BLOCK SIDE ( 126 , 174 , 4) BOTTOM NOT_WALL BULLET FLAT NOT_FLIP 0 976
 CHANGE_BLOCK SIDE ( 127 , 174 , 4) BOTTOM NOT_WALL BULLET FLAT NOT_FLIP 0 976
 CHANGE_BLOCK SIDE ( 128 , 174 , 4) BOTTOM NOT_WALL BULLET FLAT NOT_FLIP 0 976 
 
 CHANGE_BLOCK SIDE ( 133 , 174 , 4) BOTTOM NOT_WALL BULLET FLAT NOT_FLIP 0 976
 CHANGE_BLOCK SIDE ( 134 , 174 , 4) BOTTOM NOT_WALL BULLET FLAT NOT_FLIP 0 976
 CHANGE_BLOCK SIDE ( 135 , 174 , 4) BOTTOM NOT_WALL BULLET FLAT NOT_FLIP 0 976
 CHANGE_BLOCK SIDE ( 136 , 174 , 4) BOTTOM NOT_WALL BULLET FLAT NOT_FLIP 0 976
  
 CHANGE_BLOCK SIDE ( 141 , 174 , 4) BOTTOM NOT_WALL BULLET FLAT NOT_FLIP 0 976
 CHANGE_BLOCK SIDE ( 142 , 174 , 4) BOTTOM NOT_WALL BULLET FLAT NOT_FLIP 0 976
 CHANGE_BLOCK SIDE ( 143 , 174 , 4) BOTTOM NOT_WALL BULLET FLAT NOT_FLIP 0 976
 CHANGE_BLOCK SIDE ( 144 , 174 , 4) BOTTOM NOT_WALL BULLET FLAT NOT_FLIP 0 976
 DISPLAY_BRIEF ( 3008 ) // "Pitlane on
 SET start_end = 2
 SET loading = 6
ENDIF 
 
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXXX                         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXXX      WRECKED CARS       XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXXX                        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

IF ((IS_CAR_WRECKED (gt1_bmwsauber))
AND (wreck_bmwsauber = 0))
 SET wreck_bmwsauber = 2
 -- pseudo_count
ENDIF

IF ((IS_CAR_WRECKED (gt1_ferrari))
AND (wreck_ferrari = 0))
 SET wreck_ferrari = 2
 -- pseudo_count
ENDIF

IF ((IS_CAR_WRECKED (gt1_brawn))
AND (wreck_brawn = 0))
 SET wreck_brawn = 2
 -- pseudo_count
ENDIF

IF ((IS_CAR_WRECKED (gt1_redbull))
AND (wreck_redbull = 0))
 SET wreck_redbull = 2
 -- pseudo_count
ENDIF

IF ((IS_CAR_WRECKED (gt1_mclaren))
AND (wreck_mclaren = 0))
 SET wreck_mclaren = 2
 -- pseudo_count
ENDIF

IF ((IS_CAR_WRECKED (gt1_renault))
AND (wreck_renault = 0))
 SET wreck_renault = 2
 -- pseudo_count
ENDIF

// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXX                         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXX       LOCKED CARS       XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXX                         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

//bmw
IF (((NOT(HAS_CAR_GOT_DRIVER (gt1_bmwsauber)))
AND (NOT(bmw_char_alive = 2)))
AND (NOT(wreck_bmwsauber > 0)))
 CHANGE_CAR_LOCK ( gt1_bmwsauber , UNLOCKED )
ENDIF
IF (HAS_CAR_GOT_DRIVER (gt1_bmwsauber))
 CHANGE_CAR_LOCK ( gt1_bmwsauber , LOCKED )
ENDIF

//ferrari
IF (((NOT(HAS_CAR_GOT_DRIVER (gt1_ferrari)))
AND (NOT(ferrari_char_alive = 2)))
AND (NOT(wreck_ferrari > 0)))
 CHANGE_CAR_LOCK ( gt1_ferrari , UNLOCKED )
ENDIF
IF (HAS_CAR_GOT_DRIVER (gt1_ferrari))
 CHANGE_CAR_LOCK ( gt1_ferrari , LOCKED )
ENDIF

//brawn
IF (((NOT(HAS_CAR_GOT_DRIVER (gt1_brawn)))
AND (NOT(brawn_char_alive = 2)))
AND (NOT(wreck_brawn > 0)))
 CHANGE_CAR_LOCK ( gt1_brawn , UNLOCKED )
ENDIF
IF (HAS_CAR_GOT_DRIVER (gt1_brawn))
 CHANGE_CAR_LOCK ( gt1_brawn , LOCKED )
ENDIF

//redbull
IF (((NOT(HAS_CAR_GOT_DRIVER (gt1_redbull)))
AND (NOT(redbull_char_alive = 2)))
AND (NOT(wreck_redbull > 0)))
 CHANGE_CAR_LOCK ( gt1_redbull , UNLOCKED )
ENDIF
IF (HAS_CAR_GOT_DRIVER (gt1_redbull))
 CHANGE_CAR_LOCK ( gt1_redbull , LOCKED )
ENDIF

//mclaren
IF (((NOT(HAS_CAR_GOT_DRIVER (gt1_mclaren)))
AND (NOT(mclaren_char_alive = 2)))
AND (NOT(wreck_mclaren > 0)))
 CHANGE_CAR_LOCK ( gt1_mclaren , UNLOCKED )
ENDIF
IF (HAS_CAR_GOT_DRIVER (gt1_mclaren))
 CHANGE_CAR_LOCK ( gt1_mclaren , LOCKED )
ENDIF

//renault
IF (((NOT(HAS_CAR_GOT_DRIVER (gt1_renault)))
AND (NOT(renault_char_alive = 2)))
AND (NOT(wreck_renault > 0)))
 CHANGE_CAR_LOCK ( gt1_renault , UNLOCKED )
ENDIF
IF (HAS_CAR_GOT_DRIVER (gt1_renault))
 CHANGE_CAR_LOCK ( gt1_renault , LOCKED )
ENDIF

// kasa na naprawe
IF ((LOCATE_CHARACTER_BY_CAR( p1 , 103.0 , 198.5 , 4.0 , 5.0 , 5.0 ))
AND (NOT ( CHECK_SCORE_GREATER ( p1 , 4999 ))))
 ADD_SCORE_NO_MULT ( p1 , 5000 )
ENDIF
IF ((LOCATE_CHARACTER_BY_CAR( p2 , 103.0 , 198.5 , 4.0 , 5.0 , 5.0 ))
AND (NOT ( CHECK_SCORE_GREATER ( p2 , 4999 ))))
 ADD_SCORE_NO_MULT ( p2 , 5000 )
ENDIF
IF ((LOCATE_CHARACTER_BY_CAR( p3 , 103.0 , 198.5 , 4.0 , 5.0 , 5.0 ))
AND (NOT ( CHECK_SCORE_GREATER ( p3 , 4999 ))))
 ADD_SCORE_NO_MULT ( p3 , 5000 )
ENDIF
IF ((LOCATE_CHARACTER_BY_CAR( p4 , 103.0 , 198.5 , 4.0 , 5.0 , 5.0 ))
AND (NOT ( CHECK_SCORE_GREATER ( p4 , 4999 ))))
 ADD_SCORE_NO_MULT ( p4 , 5000 )
ENDIF

ENDWHILE

ADD_ONSCREEN_COUNTER ( screen_fake , fake_nic )
ADD_ONSCREEN_COUNTER ( screen_laps , laps )
CLEAR_ONSCREEN_COUNTER ( screen_fake ) 

SET main = 0
MISSION_HAS_FINISHED ( )
RETURN
 
 
MISSIONSTART

GOSUB loading_ps:

MISSIONEND 
