Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/*
by Junior_Djjr - MixMods.com.br
You need: https://forum.mixmods.com.br/f16-utilidades/t179-gta3script-while-true-return_true-e-return_false
You can edit this for mod another mod, just keep clear credits to me as a base.
*/
SCRIPT_START
{
LVAR_INT scplayer hVeh pVeh p hFx hBlip iBlipSpriteID
LVAR_FLOAT fDirt
LVAR_FLOAT CAMERA1X CAMERA1Y CAMERA1Z
LVAR_FLOAT CAMERA2X CAMERA2Y CAMERA2Z
LVAR_FLOAT CARX CARY CARZ CARA
LVAR_FLOAT PARTICLEX PARTICLEY PARTICLEZ
LVAR_FLOAT CARDX CARDY
IF READ_INT_FROM_INI_FILE "CLEO/Car Wash.ini" "Settings" "BlipSpriteID" (iBlipSpriteID)
AND iBlipSpriteID > 0
ADD_CLEO_BLIP iBlipSpriteID 2139.2253 2714.3403 TRUE (255 255 255 255) hBlip
ADD_CLEO_BLIP iBlipSpriteID 2162.7361 2464.7861 TRUE (255 255 255 255) hBlip
ADD_CLEO_BLIP iBlipSpriteID 2464.9353 -1461.2537 TRUE (255 255 255 255) hBlip
ADD_CLEO_BLIP iBlipSpriteID 1910.7087 -1768.9048 TRUE (255 255 255 255) hBlip
ADD_CLEO_BLIP iBlipSpriteID 1018.8 -926.1744 TRUE (255 255 255 255) hBlip
ENDIF
GET_PLAYER_CHAR 0 scplayer
WHILE TRUE
WAIT 150
IF IS_CHAR_SITTING_IN_ANY_CAR scplayer
IF IS_PLAYER_CONTROL_ON 0
AND NOT IS_WANTED_LEVEL_GREATER 0 0
STORE_CAR_CHAR_IS_IN_NO_SAVE scplayer hVeh
GET_DRIVER_OF_CAR hVeh p
IF p = scplayer
GOSUB CheckList
ENDIF
ENDIF
ENDIF
ENDWHILE
CheckList:
GOSUB east_ls
GOSUB idlewood
GOSUB vinewood
GOSUB pickle
GOSUB esmerald
RETURN
Pressed:
IF IS_BUTTON_PRESSED 0 11
RETURN_TRUE
RETURN
ELSE
IF timerb > 10000
PRINT_HELP CARWSHA
timerb = 0
ENDIF
ENDIF
RETURN_FALSE
RETURN
east_ls:
CARX = 2464.9353
CARY = -1461.2537
CARZ = 23.6362
IF LOCATE_CAR_3D hVeh CARX CARY CARZ 4.0 4.0 2.0 FALSE
IF GOSUB Pressed
CARA = 90.0
CAMERA1X = 2433.4844
CAMERA1Y = -1466.8766
CAMERA1Z = 26.0
CAMERA2X = 2450.9875
CAMERA2Y = -1460.3097
CAMERA2Z = 24.0
PARTICLEX = 2452.3738
PARTICLEY = -1461.2537
PARTICLEZ = 23.0
CARDX = 2442.8247
CARDY = -1461.042
GOSUB Activate
ENDIF
ENDIF
RETURN
idlewood:
CARX = 1910.7087
CARY = -1768.9048
CARZ = 12.8471
IF LOCATE_CAR_3D hVeh CARX CARY CARZ 4.0 4.0 2.0 FALSE
IF GOSUB Pressed
CARA = 180.0
CAMERA1X = 1906.5447
CAMERA1Y = -1789.3156
CAMERA1Z = 15.0
CAMERA2X = 1912.2312
CAMERA2Y = -1779.7174
CAMERA2Z = 13.3828
PARTICLEX = 1911.6976
PARTICLEY = -1777.4185
PARTICLEZ = 12.3
CARDX = 1911.6588
CARDY = -1784.8184
GOSUB Activate
ENDIF
ENDIF
RETURN
vinewood:
CARX = 1018.8
CARY = -926.1744
CARZ = 41.6421
IF LOCATE_CAR_3D hVeh CARX CARY CARZ 4.0 4.0 2.0 FALSE
IF GOSUB Pressed
CARA = 8.0
CAMERA1X = 1020.0527
CAMERA1Y = -906.0007
CAMERA1Z = 44.0
CAMERA2X = 1016.6766
CAMERA2Y = -913.4736
CAMERA2Z = 42.1797
PARTICLEX = 1017.2542
PARTICLEY = -916.9676
PARTICLEZ = 41.808
CARDX = 1016.2774
CARDY = -908.9207
GOSUB Activate
ENDIF
ENDIF
RETURN
pickle:
CARX = 2139.2253
CARY = 2714.3403
CARZ = 10.2835
IF LOCATE_CAR_3D hVeh CARX CARY CARZ 4.0 4.0 2.0 FALSE
IF GOSUB Pressed
CARA = 270.0
CAMERA1X = 2168.9836
CAMERA1Y = 2708.6091
CAMERA1Z = 12.0
CAMERA2X = 2156.1731
CAMERA2Y = 2715.6377
CAMERA2Z = 10.0
PARTICLEX = 2147.9233
PARTICLEY = 2714.2554
PARTICLEZ = 10.2825
CARDX = 2158.041
CARDY = 2714.2927
GOSUB Activate
ENDIF
ENDIF
RETURN
esmerald:
CARX = 2162.7361
CARY = 2464.7861
CARZ = 10.2878
IF LOCATE_CAR_3D hVeh CARX CARY CARZ 4.0 4.0 2.0 FALSE
IF GOSUB Pressed
CARA = 0.0
CAMERA1X = 2168.8884
CAMERA1Y = 2490.2102
CAMERA1Z = 12.0
CAMERA2X = 2162.6309
CAMERA2Y = 2479.6628
CAMERA2Z = 10.0
PARTICLEX = 2162.8997
PARTICLEY = 2474.468
PARTICLEZ = 10.2825
CARDX = 2162.7354
CARDY = 2481.2876
GOSUB Activate
ENDIF
ENDIF
RETURN
Activate:
ADD_SCORE 0 -50
SET_PLAYER_CONTROL 0 OFF
SET_FIXED_CAMERA_POSITION CAMERA1X CAMERA1Y CAMERA1Z 0.0 0.0 0.0
POINT_CAMERA_AT_POINT CAMERA2X CAMERA2Y CAMERA2Z 2
//GET_VEHICLE_DIRT_LEVEL
GET_VEHICLE_POINTER hVeh pVeh
p = pVeh + 0x4B0
READ_MEMORY p 4 FALSE (fDirt)
SET_CAR_COORDINATES_NO_OFFSET hVeh CARX CARY CARZ
SET_CAR_HEADING hVeh CARA
SET_CAR_FORWARD_SPEED hVeh 0.0
CREATE_FX_SYSTEM "carwashspray" PARTICLEX PARTICLEY PARTICLEZ 1 (hFx)
PLAY_FX_SYSTEM hFx
CAR_GOTO_COORDINATES_ACCURATE hVeh CARDX CARDY CARZ
SET_CAR_CRUISE_SPEED hVeh 4.5
SET_CAR_MISSION hVeh MISSION_GOTOCOORDS_STRAIGHT
timera = 0
WHILE NOT LOCATE_CAR_2D hVeh CARDX CARDY 3.0 3.0 FALSE
AND timera < 10000
WAIT 0
IF NOT DOES_VEHICLE_EXIST hVeh
SET_PLAYER_CONTROL 0 ON
RESTORE_CAMERA
RETURN
ENDIF
IF fDirt > 0.0
fDirt -=@ 0.1
IF fDirt < 0.0
fDirt = 0.0
ENDIF
SET_VEHICLE_DIRT_LEVEL hVeh fDirt
ENDIF
ENDWHILE
KILL_FX_SYSTEM hFx
RESTORE_CAMERA
WAIT 1000
SET_CAR_MISSION hVeh MISSION_NONE
WARP_CHAR_INTO_CAR scplayer hVeh
SET_PLAYER_CONTROL 0 ON
RETURN
}
SCRIPT_END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.