// Super Tank 25/05/2009
// www.GTAMP.com
// This script is public domain.  You can use it freely.

OBJ_DATA ball_1 = (39.0,142.0,255.0) 0 FOOTY 
OBJ_DATA ball_2 = (29.0,142.0,255.0) 0 FOOTY
OBJ_DATA ball_3 = (25.0,152.0,255.0) 0 FOOTY
OBJ_DATA ball_4 = (39.0,100.0,255.0) 0 FOOTY
OBJ_DATA ball_5 = (34.0,153.0,255.0) 0 FOOTY
OBJ_DATA ball_6 = (39.0,154.0,255.0) 0 FOOTY
OBJ_DATA ball_7 = (29.0,154.0,255.0) 0 FOOTY
OBJ_DATA ball_8 = (60.0,154.0,255.0) 0 FOOTY

PARKED_CAR_DATA trailer = (020.0,140.0) 19 0 TANK
PARKED_CAR_DATA tank1 = (021.0,140.0) 19 0 TANK
PARKED_CAR_DATA tank2 = (022.0,140.0) 19 0 TANK
PARKED_CAR_DATA tank3 = (023.0,140.0) 19 0 TANK
PARKED_CAR_DATA tank4 = (024.0,140.0) 19 0 TANK
PARKED_CAR_DATA tank5 = (025.0,140.0) 19 0 TANK
PARKED_CAR_DATA tank6 = (026.0,140.0) 19 0 TANK
PARKED_CAR_DATA tank7 = (027.0,140.0) 19 0 TANK
PARKED_CAR_DATA tank8 = (028.0,140.0) 19 0 TANK

CHAR_DATA dude1
CHAR_DATA dude2
CHAR_DATA dude3
CHAR_DATA dude4
CHAR_DATA dude5
CHAR_DATA dude6
CHAR_DATA dude7
CHAR_DATA dude8
CHAR_DATA ped

PLAYER_PED p1 = (19.40,139.9,255.0) 10 090 // Red
PLAYER_PED p2 = (21.00,139.9,255.0) 09 000 // Orange

COUNTER loop = 1
COUNTER subloop = 1
COUNTER peds
COUNTER loadtank = 1

LEVELSTART

WHILE ( LOOP = 1 )

/*
WHILE ( LOADTANK = 1 )

ped = CREATE_CHAR ( 20.0 , 138.0 , 2.0 ) 0 350 mugger END
++peds

IF ( peds < 10 )
 ORDER_CHAR_TO_BACKDOOR ( ped , trailer )
ENDIF

IF ( peds > 10 )
 ORDER_CHAR_TO_BACKDOOR ( ped , tank1 )
ENDIF

IF ( peds > 20 )
 ORDER_CHAR_TO_BACKDOOR ( ped , tank2 )
ENDIF

IF ( peds > 30 )
 ORDER_CHAR_TO_BACKDOOR ( ped , tank3 )
ENDIF

IF ( peds > 40 )
 ORDER_CHAR_TO_BACKDOOR ( ped , tank4 )
ENDIF

IF ( peds = 50 )
 SET LOADTANK = 0
ENDIF

ENDWHILE
*/

SET_CAR_ROCKETPROOF ( tank1, ON )
SET_CAR_ROCKETPROOF ( tank2, ON )
SET_CAR_ROCKETPROOF ( tank3, ON )
SET_CAR_ROCKETPROOF ( tank4, ON )
SET_CAR_ROCKETPROOF ( tank5, ON )
SET_CAR_ROCKETPROOF ( tank6, ON )
SET_CAR_ROCKETPROOF ( tank7, ON )
SET_CAR_ROCKETPROOF ( tank8, ON )
SET_CAR_BULLETPROOF ( tank1, ON )
SET_CAR_BULLETPROOF ( tank2, ON )
SET_CAR_BULLETPROOF ( tank3, ON )
SET_CAR_BULLETPROOF ( tank4, ON )
SET_CAR_BULLETPROOF ( tank5, ON )
SET_CAR_BULLETPROOF ( tank6, ON )
SET_CAR_BULLETPROOF ( tank7, ON )
SET_CAR_BULLETPROOF ( tank8, ON )
SET_CAR_FLAMEPROOF ( tank1, ON )
SET_CAR_FLAMEPROOF ( tank2, ON )
SET_CAR_FLAMEPROOF ( tank3, ON )
SET_CAR_FLAMEPROOF ( tank4, ON )
SET_CAR_FLAMEPROOF ( tank5, ON )
SET_CAR_FLAMEPROOF ( tank6, ON )
SET_CAR_FLAMEPROOF ( tank7, ON )
SET_CAR_FLAMEPROOF ( tank8, ON )

SET_CAR_ROCKETPROOF ( trailer, ON )
SET_CAR_BULLETPROOF ( trailer, ON )
SET_CAR_FLAMEPROOF ( trailer, ON )

GIVE_WEAPON ( trailer , car_machine_gun )
GIVE_WEAPON ( trailer , tank_gun )

WHILE ( SUBLOOP = 1 )

IF ( IS_CHARACTER_IN_CAR  ( p1, trailer ))
 dude2 = CREATE_CHAR_INSIDE_CAR ( tank2 ) 8 tank_driver END
 dude3 = CREATE_CHAR_INSIDE_CAR ( tank3 ) 8 tank_driver END
 dude4 = CREATE_CHAR_INSIDE_CAR ( tank4 ) 8 tank_driver END
 dude5 = CREATE_CHAR_INSIDE_CAR ( tank5 ) 8 tank_driver END
 dude6 = CREATE_CHAR_INSIDE_CAR ( tank6 ) 8 tank_driver END
 dude7 = CREATE_CHAR_INSIDE_CAR ( tank7 ) 8 tank_driver END
 dude8 = CREATE_CHAR_INSIDE_CAR ( tank8 ) 8 tank_driver END
 SET_CHAR_OBJECTIVE ( dude2 , FIRE_AT_OBJECT_FROM_VEHICLE , ball_1 ) 
 SET_CHAR_OBJECTIVE ( dude3 , FIRE_AT_OBJECT_FROM_VEHICLE , ball_2 ) 
 SET_CHAR_OBJECTIVE ( dude4 , FIRE_AT_OBJECT_FROM_VEHICLE , ball_3 ) 
 SET_CHAR_OBJECTIVE ( dude5 , FIRE_AT_OBJECT_FROM_VEHICLE , ball_4 ) 
 SET_CHAR_OBJECTIVE ( dude6 , FIRE_AT_OBJECT_FROM_VEHICLE , ball_5 ) 
 SET_CHAR_OBJECTIVE ( dude7 , FIRE_AT_OBJECT_FROM_VEHICLE , ball_6 ) 
 SET_CHAR_OBJECTIVE ( dude8 , FIRE_AT_OBJECT_FROM_VEHICLE , ball_7 ) 
 PUT_CAR_ON_TRAILER ( tank1 , trailer )
 PUT_CAR_ON_TRAILER ( tank2 , trailer )
 PUT_CAR_ON_TRAILER ( tank3 , trailer )
 PUT_CAR_ON_TRAILER ( tank4 , trailer )
 PUT_CAR_ON_TRAILER ( tank5 , trailer )
 PUT_CAR_ON_TRAILER ( tank6 , trailer )
 PUT_CAR_ON_TRAILER ( tank7 , trailer )
 PUT_CAR_ON_TRAILER ( tank8 , trailer )
 SET SUBLOOP = 0
ENDIF

ENDWHILE

ENDWHILE

LEVELEND
