PLAYER_PED p1 = (125.0, 129.5, 255.0) 5 180
PLAYER_PED p2 = (128.0, 129.5, 255.0) 7 180
PLAYER_PED p3 = (127.0, 129.5, 255.0) 10 180
PLAYER_PED p4 = (126.0, 129.5, 255.0) 11 180
PLAYER_PED p5 = (128.99, 129.5, 2.0) 12 180
PLAYER_PED p6 = (124.0, 129.5, 2.0) 13 180

CAR_DATA startcar1
CAR_DATA startcar2
CAR_DATA startcar3
CAR_DATA startcar4
CAR_DATA startcar5
CAR_DATA startcar6

CAR_DATA nextcar1
CAR_DATA nextcar2
CAR_DATA nextcar3
CAR_DATA nextcar4
CAR_DATA nextcar5
CAR_DATA nextcar6

COUNTER  mainloop = 1
COUNTER  runonce = 1

COUNTER random=44
COUNTER rand=0

COUNTER sz11=1
COUNTER sz12=1
COUNTER sz13=1
COUNTER sz14=1
COUNTER sz15=1
COUNTER sz16=1
COUNTER sz21=0
COUNTER sz22=0
COUNTER sz23=0
COUNTER sz24=0
COUNTER sz25=0
COUNTER sz26=0

COUNTER display11=1
COUNTER display21=1
COUNTER display31=1
COUNTER display41=1

COUNTER display12=1
COUNTER display22=1
COUNTER display32=1
COUNTER display42=1

COUNTER display13=1
COUNTER display23=1
COUNTER display33=1
COUNTER display43=1

COUNTER display14=1
COUNTER display24=1
COUNTER display34=1
COUNTER display44=1

COUNTER display15=1
COUNTER display25=1
COUNTER display35=1
COUNTER display45=1

COUNTER display16=1
COUNTER display26=1
COUNTER display36=1
COUNTER display46=1

LEVELSTART
WHILE_EXEC (mainloop = 1)
IF(runonce = 1)

SET_AMBIENT_LEVEL  ( 0.3  , 1 )

nextcar1 = CREATE_CAR (73.5, 41.5) 2 180 GT24640 END
nextcar2 = CREATE_CAR (75.5, 41.5) 2 180 ZCX5 END
nextcar3 = CREATE_CAR (76.5, 41.5) 2 180 WBTWIN END
nextcar4 = CREATE_CAR (78.5, 41.5) 2 180 STRIPETB END
nextcar5 = CREATE_CAR (74.5, 41.5) 2 180 T2000GT END
nextcar6 = CREATE_CAR (77.5, 41.5) 2 180 STINGRAY END

DISPLAY_BRIEF ( 1020 )
//DISPLAY_MESSAGE (5504)

ENDIF

IF (IS_CAR_WRECKED ( nextcar1 ))
nextcar1 = CREATE_CAR (73.5, 41.5) 2 180 GT24640 END
ENDIF
IF (IS_CAR_WRECKED ( nextcar2 ))
nextcar2 = CREATE_CAR (75.5, 41.5) 2 180 ZCX5 END
ENDIF
IF (IS_CAR_WRECKED ( nextcar3 ))
nextcar3 = CREATE_CAR (76.5, 41.5) 2 180 WBTWIN END
ENDIF
IF (IS_CAR_WRECKED ( nextcar4 ))
nextcar4 = CREATE_CAR (78.5, 41.5) 2 180 STRIPETB END
ENDIF
IF (IS_CAR_WRECKED ( nextcar5 ))
nextcar5 = CREATE_CAR (74.5, 41.5) 2 180 T2000GT END
ENDIF
IF (IS_CAR_WRECKED ( nextcar6 ))
nextcar6 = CREATE_CAR (77.5, 41.5) 2 180 STINGRAY END
ENDIF

	IF (CHECK_CHARACTER_HEALTH(p1, 0))
		IF ((runonce=1) OR (IS_CAR_WRECKED ( startcar1 )))
			startcar1 = CREATE_CAR (125.0, 128.5) 28 180 WBTWIN END
		ENDIF
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p1 , 126.5 , 136.5 , 2.0 , 5.0 , 5.0 ))
			IF (display31=1)
				SET display31=0
				DISPLAY_MESSAGE ( 5501 )
			ENDIF
			ADD_SCORE  ( p1 , 999999 )
		ELSE
			SET display31=1
		ENDIF

		//Respawnpoints
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p1, 111.5, 104.5, 1.0, 2.0, 2.0))
			IF (sz11=1)
				IF (display11=1)
					SET display11=0
					DISPLAY_MESSAGE ( 5059 )
				ENDIF
				IF (NOT(HAS_CHARACTER_DIED(p1)))
					WARP_FROM_CAR_TO_POINT ( p1, 125.0, 129.5, 2.0, 180 )
					SET display11=1
				ENDIF
			ENDIF
			IF (sz21=1)
				IF (NOT(HAS_CHARACTER_DIED(p1)))
					WARP_FROM_CAR_TO_POINT ( p1, 76.0, 42.5, 4.0, 180 )
				ENDIF
			ENDIF
		ENDIF
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p1, 76.0, 40.5, 4.0, 5.0, 3.0))
			IF (display21=1)
				SET display21=0
				DISPLAY_MESSAGE ( 5503 )
			ENDIF
			SET sz11=0
			SET sz21=1
		ELSE
			SET display21=1
		ENDIF
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p1, 126.5, 125.5, 2.0, 6.0, 4.0))
			IF (display41=1)
				SET display41=0
				DISPLAY_MESSAGE ( 5504 )
			ENDIF
			DO_NOWT
		ELSE
			SET display41=1
		ENDIF
	ENDIF

	IF (CHECK_CHARACTER_HEALTH(p2, 0))
		IF ((runonce=1) OR (IS_CAR_WRECKED ( startcar2 )))
			startcar2 = CREATE_CAR (128.0, 128.5) 3 180 WBTWIN END
		ENDIF
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p2 , 126.5 , 136.5 , 2.0 , 5.0 , 5.0 ))
			IF (display32=1)
				SET display32=0
				DISPLAY_MESSAGE ( 5501 )
			ENDIF
			ADD_SCORE  ( p2 , 999999 )
		ELSE
			SET display32=1
		ENDIF

		//Respawnpoints
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p2, 111.5, 104.5, 1.0, 2.0, 2.0))
			IF (sz12=1)
				IF (display12=1)
					SET display12=0
					DISPLAY_MESSAGE ( 5059 )
				ENDIF
				IF (NOT(HAS_CHARACTER_DIED(p2)))
					WARP_FROM_CAR_TO_POINT ( p2, 128.0, 129.5, 2.0, 180 )
					SET display12=1
				ENDIF
			ENDIF
			IF (sz22=1)
				IF (NOT(HAS_CHARACTER_DIED(p2)))
					WARP_FROM_CAR_TO_POINT ( p2, 76.0, 42.5, 4.0, 180 )
				ENDIF
			ENDIF
		ENDIF
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p2, 76.0, 40.5, 4.0, 5.0, 3.0))
			IF (display22=1)
				SET display22=0
				DISPLAY_MESSAGE ( 5503 )
			ENDIF
			SET sz12=0
			SET sz22=1
		ELSE
			SET display22=1
		ENDIF
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p2, 126.5, 125.5, 2.0, 6.0, 4.0))
			IF (display42=1)
				SET display42=0
				DISPLAY_MESSAGE ( 5504 )
			ENDIF
			DO_NOWT
		ELSE
			SET display42=1
		ENDIF
	ENDIF

	IF (CHECK_CHARACTER_HEALTH(p3, 0))
		IF ((runonce=1) OR (IS_CAR_WRECKED ( startcar3 )))
			startcar3 = CREATE_CAR (127.0, 128.5) 20 180 WBTWIN END
		ENDIF
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p3 , 126.5 , 136.5 , 2.0 , 5.0 , 5.0 ))
			IF (display33=1)
				SET display33=0
				DISPLAY_MESSAGE ( 5501 )
			ENDIF
			ADD_SCORE  ( p3 , 999999 )
		ELSE
			SET display33=1
		ENDIF

		//Respawnpoints
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p3, 111.5, 104.5, 1.0, 2.0, 2.0))
			IF (sz13=1)
				IF (display13=1)
					SET display13=0
					DISPLAY_MESSAGE ( 5059 )
				ENDIF
				IF (NOT(HAS_CHARACTER_DIED(p3)))
					WARP_FROM_CAR_TO_POINT ( p3, 127.0, 129.5, 2.0, 180 )
					SET display13=1
				ENDIF
			ENDIF
			IF (sz23=1)
				IF (NOT(HAS_CHARACTER_DIED(p3)))
					WARP_FROM_CAR_TO_POINT ( p3, 76.0, 42.5, 4.0, 180 )
				ENDIF
			ENDIF
		ENDIF
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p3, 76.0, 40.5, 4.0, 5.0, 3.0))
			IF (display23=1)
				SET display23=0
				DISPLAY_MESSAGE ( 5503 )
			ENDIF
			SET sz13=0
			SET sz23=1
		ELSE
			SET display23=1
		ENDIF
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p3, 126.5, 125.5, 2.0, 6.0, 4.0))
			IF (display43=1)
				SET display43=0
				DISPLAY_MESSAGE ( 5504 )
			ENDIF
			DO_NOWT
		ELSE
			SET display43=1
		ENDIF
	ENDIF

	IF (CHECK_CHARACTER_HEALTH(p4, 0))
		IF ((runonce=1) OR (IS_CAR_WRECKED ( startcar4 )) )
			startcar4 = CREATE_CAR (126.0, 128.5) 35 180 WBTWIN END
		ENDIF
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p4 , 126.5 , 136.5 , 2.0 , 5.0 , 5.0 ))
			IF (display34=1)
				SET display34=0
				DISPLAY_MESSAGE ( 5501 )
			ENDIF
			ADD_SCORE  ( p4 , 999999 )
		ELSE
			SET display34=1
		ENDIF

		//Respawnpoints
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p4, 111.5, 104.5, 1.0, 2.0, 2.0))
			IF (sz14=1)
				IF (display14=1)
					SET display14=0
					DISPLAY_MESSAGE ( 5059 )
				ENDIF
				IF (NOT(HAS_CHARACTER_DIED(p4)))
					WARP_FROM_CAR_TO_POINT ( p4, 126.0, 129.5, 2.0, 180 )
					SET display14=1
				ENDIF
			ENDIF
			IF (sz24=1)
				IF (NOT(HAS_CHARACTER_DIED(p4)))
					WARP_FROM_CAR_TO_POINT ( p4, 76.0, 42.5, 4.0, 180 )
				ENDIF
			ENDIF
		ENDIF
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p4, 76.0, 40.5, 4.0, 5.0, 3.0))
			IF (display24=1)
				SET display24=0
				DISPLAY_MESSAGE ( 5503 )
			ENDIF
			SET sz14=0
			SET sz24=1
		ELSE
			SET display24=1
		ENDIF
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p4, 126.5, 125.5, 2.0, 6.0, 4.0))
			IF (display44=1)
				SET display44=0
				DISPLAY_MESSAGE ( 5504 )
			ENDIF
			DO_NOWT
		ELSE
			SET display44=1
		ENDIF
	ENDIF

	IF (CHECK_CHARACTER_HEALTH(p5, 0))
		IF ((runonce=1) OR (IS_CAR_WRECKED ( startcar5 )))
			startcar5 = CREATE_CAR (128.99, 128.5, 2.0) 19 180 WBTWIN END
		ENDIF
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p5 , 126.5 , 136.5 , 2.0 , 5.0 , 5.0 ))
			IF (display35=1)
				SET display35=0
				DISPLAY_MESSAGE ( 5501 )
			ENDIF
			ADD_SCORE  ( p5 , 999999 )
		ELSE
			SET display35=1
		ENDIF

		//Respawnpoints
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p5, 111.5, 104.5, 1.0, 2.0, 2.0))
			IF (sz15=1)
				IF (display15=1)
					SET display15=0
					DISPLAY_MESSAGE ( 5059 )
				ENDIF
				IF (NOT(HAS_CHARACTER_DIED(p5)))
					WARP_FROM_CAR_TO_POINT ( p5, 129.0, 129.5, 2.0, 180 )
					SET display15=1
				ENDIF
			ENDIF
			IF (sz25=1)
				IF (NOT(HAS_CHARACTER_DIED(p5)))
					WARP_FROM_CAR_TO_POINT ( p5, 76.0, 42.5, 4.0, 180 )
				ENDIF
			ENDIF
		ENDIF
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p5, 76.0, 40.5, 4.0, 5.0, 3.0))
			IF (display25=1)
				SET display15=0
				DISPLAY_MESSAGE ( 5503 )
			ENDIF
			SET sz15=0
			SET sz25=1
		ELSE
			SET display25=1
		ENDIF
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p5, 126.5, 125.5, 2.0, 6.0, 4.0))
			IF (display45=1)
				SET display45=0
				DISPLAY_MESSAGE ( 5504 )
			ENDIF
			DO_NOWT
		ELSE
			SET display45=1
		ENDIF
	ENDIF

	IF (CHECK_CHARACTER_HEALTH(p6, 0))
		IF ((runonce=1) OR (IS_CAR_WRECKED ( startcar6 )))
			startcar6 = CREATE_CAR (124.0, 128.5) 9 180 WBTWIN END
		ENDIF
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p6 , 126.5 , 136.5 , 2.0 , 5.0 , 5.0 ))
			IF (display36=1)
				SET display36=0
				DISPLAY_MESSAGE ( 5501 )
			ENDIF
			ADD_SCORE  ( p6 , 999999 )
		ELSE
			SET display36=1
		ENDIF

		//Respawnpoints
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p6, 111.5, 104.5, 1.0, 2.0, 2.0))
			IF (sz16=1)
				IF (display16=1)
					SET display16=0
					DISPLAY_MESSAGE ( 5059 )
				ENDIF
				IF (NOT(HAS_CHARACTER_DIED(p6)))
					WARP_FROM_CAR_TO_POINT ( p6, 127.0, 129.5, 2.0, 180 )
					SET display16=1
				ENDIF
			ENDIF
			IF (sz26=1)
				IF (NOT(HAS_CHARACTER_DIED(p6)))
					WARP_FROM_CAR_TO_POINT ( p6, 76.0, 42.5, 4.0, 180 )
				ENDIF
			ENDIF
		ENDIF
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p6, 76.0, 40.5, 4.0, 5.0, 3.0))
			IF (display26=1)
				SET display26=0
				DISPLAY_MESSAGE ( 5503 )
			ENDIF
			SET sz16=0
			SET sz26=1
		ELSE
			SET display26=1
		ENDIF
		IF ( LOCATE_CHARACTER_ANY_MEANS ( p6, 126.5, 125.5, 2.0, 6.0, 4.0))
			IF (display46=1)
				SET display46=0
				DISPLAY_MESSAGE ( 5504 )
			ENDIF
			DO_NOWT
		ELSE
			SET display46=1
		ENDIF
	ENDIF


SET runonce = 0
ENDWHILE
LEVELEND
