Created
February 16, 2021 15:18
-
-
Save user-grinch/73b30f04cf8f3ca551c0b544f06e2ced to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// by Junior_Djjr - MixMods.com.br | |
// You need: https://forum.mixmods.com.br/f141-gta3script-cleo/t5206-como-criar-scripts-com-cleoplus | |
SCRIPT_START | |
{ | |
LVAR_INT scplayer iCurLocal iNewLocal iCarrecIndex pString i bShowedMoneyInfo hPlane | |
LVAR_FLOAT x y z a x2 y2 sizeX sizeY planeX planeY planeZ | |
CONST_INT LOCAL_LS 0 | |
CONST_INT LOCAL_SF 1 | |
CONST_INT LOCAL_LV 2 | |
CONST_INT LOCAL_LC 3 | |
CONST_INT LOCAL_VC 4 | |
CONST_INT PLANE_MODEL 577 // AT-400 | |
CONST_INT FLIGHT_CHARGE 500 | |
CONST_INT CARREC_VC_LS 908 | |
CONST_INT CARREC_VC_LC 909 | |
CONST_INT CARREC_VC_LV 910 | |
CONST_INT CARREC_LC_VC 911 | |
CONST_INT CARREC_LC_LS 912 | |
CONST_INT CARREC_LC_LV 913 | |
CONST_INT CARREC_LS_LC 914 | |
CONST_INT CARREC_LS_VC 915 | |
CONST_INT CARREC_LV_LC 916 | |
CONST_INT CARREC_LV_VC 917 | |
CONST_INT CARREC_SF_LC 918 | |
CONST_INT CARREC_SF_VC 919 | |
CONST_FLOAT CAMERA_RADIUS 100.0 | |
CONST_FLOAT CHAR_RADIUS 1.5 | |
GET_PLAYER_CHAR 0 scplayer | |
WHILE TRUE | |
WAIT 0 | |
// LS | |
WHILE LOCATE_CAMERA_DISTANCE_TO_COORDINATES 1685.7319 -2245.3779 13.5469 CAMERA_RADIUS | |
iCurLocal = LOCAL_LS | |
x = 1688.4042 | |
y = -2238.6804 | |
z = 13.5469 | |
iNewLocal = LOCAL_LC | |
GOSUB ConsiderEntrance | |
x = 1683.2517 | |
y = -2238.8315 | |
z = 13.5469 | |
iNewLocal = LOCAL_VC | |
GOSUB ConsiderEntrance | |
WAIT 0 | |
ENDWHILE | |
// SF | |
WHILE LOCATE_CAMERA_DISTANCE_TO_COORDINATES -1425.1151 -291.1034 14.1484 CAMERA_RADIUS | |
iCurLocal = LOCAL_SF | |
x = -1424.321 | |
y = -285.8853 | |
z = 14.1484 | |
iNewLocal = LOCAL_LC | |
GOSUB ConsiderEntrance | |
x = -1419.4792 | |
y = -289.9804 | |
z = 14.1484 | |
iNewLocal = LOCAL_VC | |
GOSUB ConsiderEntrance | |
WAIT 0 | |
ENDWHILE | |
// LV | |
WHILE LOCATE_CAMERA_DISTANCE_TO_COORDINATES 1677.8302 1423.3003 10.7755 CAMERA_RADIUS | |
iCurLocal = LOCAL_LV | |
x = 1663.4738 | |
y = 1420.6056 | |
z = 10.7937 | |
iNewLocal = LOCAL_LC | |
GOSUB ConsiderEntrance | |
x = 1663.6283 | |
y = 1426.9905 | |
z = 10.7898 | |
iNewLocal = LOCAL_VC | |
GOSUB ConsiderEntrance | |
WAIT 0 | |
ENDWHILE | |
// LC | |
WHILE LOCATE_CAMERA_DISTANCE_TO_COORDINATES 4920.9829 1658.6134 8.8172 CAMERA_RADIUS | |
iCurLocal = LOCAL_LC | |
x = 4897.1021 | |
y = 1651.8237 | |
z = 11.2992 | |
iNewLocal = LOCAL_VC | |
GOSUB ConsiderEntrance | |
x = 4897.105 | |
y = 1647.6316 | |
z = 11.2992 | |
iNewLocal = LOCAL_LS | |
GOSUB ConsiderEntrance | |
x = 4897.1553 | |
y = 1649.7626 | |
z = 11.2992 | |
iNewLocal = LOCAL_LV | |
GOSUB ConsiderEntrance | |
WAIT 0 | |
ENDWHILE | |
// VC | |
WHILE LOCATE_CAMERA_DISTANCE_TO_COORDINATES 4539.2671 -3827.5396 8.8347 CAMERA_RADIUS | |
iCurLocal = LOCAL_VC | |
x = 4528.0273 | |
y = -3848.1455 | |
z = 8.8325 | |
iNewLocal = LOCAL_LC | |
GOSUB ConsiderEntrance | |
x = 4532.3682 | |
y = -3850.9236 | |
z = 8.8325 | |
iNewLocal = LOCAL_LS | |
GOSUB ConsiderEntrance | |
x = 4531.3022 | |
y = -3847.9006 | |
z = 8.8325 | |
iNewLocal = LOCAL_LV | |
GOSUB ConsiderEntrance | |
WAIT 0 | |
ENDWHILE | |
ENDWHILE | |
ConsiderEntrance: | |
IF CONVERT_3D_TO_SCREEN_2D x y z TRUE TRUE x2 y2 sizeX sizeY | |
IF sizeX > 0.15 | |
SWITCH iNewLocal | |
CASE LOCAL_LS | |
GET_LABEL_POINTER StringLosSantos pString | |
BREAK | |
CASE LOCAL_SF | |
GET_LABEL_POINTER StringSanFierro pString | |
BREAK | |
CASE LOCAL_LV | |
GET_LABEL_POINTER StringLasVenturas pString | |
BREAK | |
CASE LOCAL_LC | |
GET_LABEL_POINTER StringLibertyCity pString | |
BREAK | |
CASE LOCAL_VC | |
GET_LABEL_POINTER StringViceCity pString | |
BREAK | |
ENDSWITCH | |
sizeX *= 0.7 | |
sizeY *= 0.8 | |
DRAW_STRING $pString DRAW_EVENT_BEFORE_HUD x2 y2 sizeX sizeY TRUE FONT_MENU | |
ENDIF | |
ENDIF | |
IF LOCATE_STOPPED_CHAR_ANY_MEANS_3D scplayer x y z CHAR_RADIUS CHAR_RADIUS CHAR_RADIUS TRUE | |
STORE_SCORE 0 i | |
IF i >= 500 | |
GOSUB StartTravel | |
ELSE | |
IF bShowedMoneyInfo = FALSE | |
PRINT_HELP_STRING "$You don't have enough money, ~r~$500!" | |
bShowedMoneyInfo = TRUE | |
ENDIF | |
ENDIF | |
ELSE | |
IF NOT IS_CHAR_STOPPED scplayer | |
bShowedMoneyInfo = FALSE | |
ENDIF | |
ENDIF | |
RETURN | |
StartTravel: | |
GOSUB GetTeleportCoords | |
GOSUB GetCarrecIndex | |
SET_MINIGAME_IN_PROGRESS TRUE | |
DISPLAY_HUD FALSE | |
DISPLAY_RADAR FALSE | |
SET_PLAYER_CONTROL 0 OFF | |
SET_PLAYER_CONTROL_PAD_MOVEMENT 0 OFF | |
DO_FADE 1500 FADE_OUT | |
WAIT 1600 | |
REQUEST_MODEL PLANE_MODEL | |
REQUEST_CAR_RECORDING iCarrecIndex | |
LOAD_ALL_MODELS_NOW | |
CREATE_CAR PLANE_MODEL 0.0 0.0 100.0 hPlane | |
WARP_CHAR_INTO_CAR_AS_PASSENGER scplayer hplane 0 | |
RESTORE_CAMERA_JUMPCUT | |
SET_CINEMA_CAMERA TRUE | |
START_PLAYBACK_RECORDED_CAR hPlane iCarrecIndex | |
PAUSE_PLAYBACK_RECORDED_CAR hPlane | |
DO_FADE 1500 FADE_IN | |
WAIT 3000 | |
CHANGE_PLAYER_MONEY 0 CHANGE_MONEY_REMOVE 500 | |
UNPAUSE_PLAYBACK_RECORDED_CAR hPlane | |
PRINT_HELP_STRING "Press ~k~~CONVERSATION_YES~ to skip the trip." | |
WHILE IS_PLAYBACK_GOING_ON_FOR_CAR hPlane | |
WAIT 0 | |
IF IS_BUTTON_PRESSED PAD1 DPADRIGHT // Y | |
BREAK | |
ENDIF | |
GET_CAR_COORDINATES hPlane planeX planeY planeZ | |
IF planeZ > 25.0 | |
SET_PLANE_UNDERCARRIAGE_UP hPlane TRUE | |
ELSE | |
SET_PLANE_UNDERCARRIAGE_UP hPlane FALSE | |
ENDIF | |
ENDWHILE | |
WAIT 1500 | |
DO_FADE 1500 FADE_OUT | |
WAIT 1600 | |
WARP_CHAR_FROM_CAR_TO_COORD scplayer x y z | |
LOAD_SCENE x y z | |
STOP_PLAYBACK_RECORDED_CAR hPlane | |
SET_CHAR_HEADING scplayer a | |
RESTORE_CAMERA_JUMPCUT | |
SET_CINEMA_CAMERA FALSE | |
MARK_MODEL_AS_NO_LONGER_NEEDED PLANE_MODEL | |
REMOVE_CAR_RECORDING iCarrecIndex | |
DELETE_CAR hPlane | |
WAIT 1500 | |
DO_FADE 1500 FADE_IN | |
SET_PLAYER_CONTROL 0 ON | |
SET_PLAYER_CONTROL_PAD_MOVEMENT 0 ON | |
SET_MINIGAME_IN_PROGRESS FALSE | |
DISPLAY_HUD TRUE | |
DISPLAY_RADAR TRUE | |
RETURN | |
GetCarrecIndex: | |
SWITCH iCurLocal | |
CASE LOCAL_LS | |
IF iNewLocal = LOCAL_LC | |
iCarrecIndex = CARREC_LS_LC | |
ENDIF | |
IF iNewLocal = LOCAL_VC | |
iCarrecIndex = CARREC_LS_VC | |
ENDIF | |
BREAK | |
CASE LOCAL_SF | |
IF iNewLocal = LOCAL_LC | |
iCarrecIndex = CARREC_SF_LC | |
ENDIF | |
IF iNewLocal = LOCAL_VC | |
iCarrecIndex = CARREC_SF_VC | |
ENDIF | |
BREAK | |
CASE LOCAL_LV | |
IF iNewLocal = LOCAL_LC | |
iCarrecIndex = CARREC_LV_LC | |
ENDIF | |
IF iNewLocal = LOCAL_VC | |
iCarrecIndex = CARREC_LV_VC | |
ENDIF | |
BREAK | |
CASE LOCAL_LC | |
IF iNewLocal = LOCAL_LS | |
iCarrecIndex = CARREC_LC_LS | |
ENDIF | |
IF iNewLocal = LOCAL_VC | |
iCarrecIndex = CARREC_LC_VC | |
ENDIF | |
IF iNewLocal = LOCAL_LV | |
iCarrecIndex = CARREC_LC_LV | |
ENDIF | |
BREAK | |
CASE LOCAL_VC | |
IF iNewLocal = LOCAL_LS | |
iCarrecIndex = CARREC_VC_LS | |
ENDIF | |
IF iNewLocal = LOCAL_LC | |
iCarrecIndex = CARREC_VC_LC | |
ENDIF | |
IF iNewLocal = LOCAL_LV | |
iCarrecIndex = CARREC_VC_LV | |
ENDIF | |
BREAK | |
ENDSWITCH | |
RETURN | |
GetTeleportCoords: | |
SWITCH iNewLocal | |
CASE LOCAL_LS | |
x = 1685.7319 | |
y = -2245.3779 | |
z = 13.5469 | |
a = 180.0 | |
BREAK | |
CASE LOCAL_SF | |
x = -1425.1151 | |
y = -291.1034 | |
z = 14.1484 | |
a = 140.0 | |
BREAK | |
CASE LOCAL_LV | |
x = 1677.8302 | |
y = 1423.3003 | |
z = 10.7755 | |
a = 270.0 | |
BREAK | |
CASE LOCAL_LC | |
x = 4920.9829 | |
y = 1658.6134 | |
z = 8.8172 | |
a = 270.0 | |
BREAK | |
CASE LOCAL_VC | |
x = 4539.2671 | |
y = -3827.5396 | |
z = 8.8347 | |
a = 311.0 | |
BREAK | |
ENDSWITCH | |
RETURN | |
} | |
SCRIPT_END | |
StringLosSantos: | |
DUMP | |
"Los Santos" 00 | |
ENDDUMP | |
StringSanFierro: | |
DUMP | |
"San Fierro" 00 | |
ENDDUMP | |
StringLasVenturas: | |
DUMP | |
"Las Venturas" 00 | |
ENDDUMP | |
StringLibertyCity: | |
DUMP | |
"Liberty City" 00 | |
ENDDUMP | |
StringViceCity: | |
DUMP | |
"Vice City" 00 | |
ENDDUMP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment