|
 |
|
|
|
|
|
Attention:
|
The Mod Showroom is only for posting previews/downloads of completed or near finished mods. All help topics should be posted in the Editing Discussion forums. Help topics and mod requests posted here will be locked or binned. Thank you.
|
|
GTAGarage.com : Free mod hosting, attach your files and screenshots to your topics
GTAModding.com : A wiki for everything related to GTA modding, including documentation and tutorials
|
[BETA][SA] Car Wash, Code To Make Your Own Car Wash
 |
|
 |
| |
demonj0e  |
|
Sa Coder In Training

Group: Members
Joined: Apr 5, 2005


|
Well after somone requested a car wash here, http://www.gtaforums.com/index.php?showtopic=210827&st=0
I tried this and after an eavening of working ive made a piece of code wich allows you to have a carwash, Its pretty simple at the min but ill add more tomoz (tiem for sleeping now),
Whats this dose is creates a marker at the carwash up the road from where u start off at (opposite the clucking bell)you drive into it and it fixes up your car and cleans it of any dirt, (guess you could say its just like a pay and spray garage)
Well heres the code, will add more tomoz As usual thanks to Demerast for helping with the code
| CODE | ----------------------Goes With Other Create_thread code---------- 004F: create_thread ££CARWASH02
--------------------------Goes Above mission 0-----------------
:CARWASH02 0001: wait 250 ms 00D6: if 0 0256: player $PLAYER_CHAR defined 004D: jump_if_false ££CARWASH02 00D6: if 0 0103: actor $PLAYER_ACTOR stopped_near_point_in_car 2454.918 -1461.145 24.236 radius 6.0 6.0 4.0 sphere 1 004D: jump_if_false ££CARWASH02 03C0: @0 = actor $PLAYER_ACTOR car 00AA: store_car @0 position_to @1 @2 @3 0227: @4 = car @0 health 08EC: @6 = car @0 type 0441: @7 = car @0 model 03F3: get_car @0 color @90 @91 0247: request_model @7
:CARWASH03 0001: wait 0 ms 00D6: if 0 0248: model @7 available 004D: jump_if_false ££CARWASH03 0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 2454.702 -1461.226 24 00A6: destroy_car @0 00A5: @5 = create_car @7 at @1 @2 22.0 0175: set_car @5 z_angle_to 90.0 036A: put_actor $PLAYER_ACTOR in_car @5 0224: set_car @5 health_to @4 0229: set_car @5 color_to @90 @91 0249: release_model @7 01C3: remove_references_to_car @5;; Like turning a car into any random car
:CARWASH04 0001: wait 250 ms 00D6: if 0 0256: player $PLAYER_CHAR defined 004D: jump_if_false ££CARWASH02 00D6: if 0 00FE: actor $PLAYER_ACTOR 0 ()near_point 2454.918 -1461.145 24.236 radius 6.0 6.0 4.0 004D: jump_if_false ££CARWASH02 0002: jump ££CARWASH04 |
If anyone has some free time can they find co-ordinates of other car washes? This post has been edited by demonj0e on Aug 25 2005, 06:42
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Demarest  |
|
what could be

Group: BUSTED!
Joined: Jul 12, 2003

|
As mentioned in that other thread, you don't need to use vars for spheres, so the @10 is useless. Also, you should code in a way to catch all, not pray all So again, I would recommend an escape loop over a 9 second wait. Like so| CODE | :CARWASH02 0001: wait 250 ms 00D6: if 0 0256: player $PLAYER_CHAR defined 004D: jump_if_false ££CARWASH02 00D6: if 0 0103: actor $PLAYER_ACTOR stopped_near_point_in_car 2454.918 -1461.145 24.236 radius 6.0 6.0 4.0 sphere 1 004D: jump_if_false ££CARWASH02 03C0: @0 = actor $PLAYER_ACTOR car 00AA: store_car @0 position_to @1 @2 @3 0227: @4 = car @0 health 08EC: @6 = car @0 type 0441: @7 = car @0 model 03F3: get_car @0 color @90 @91 0247: request_model @7
:CARWASH03 0001: wait 0 ms 00D6: if 0 0248: model @7 available 004D: jump_if_false ££CARWASH03 0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 2454.702 -1461.226 24 00A6: destroy_car @0 00A5: @5 = create_car @7 at @1 @2 22.0 0175: set_car @5 z_angle_to 90.0 036A: put_actor $PLAYER_ACTOR in_car @5 0224: set_car @5 health_to @4 0229: set_car @5 color_to @90 @91 0249: release_model @7 01C3: remove_references_to_car @5;; Like turning a car into any random car
:CARWASH04 0001: wait 250 ms 00D6: if 0 0256: player $PLAYER_CHAR defined 004D: jump_if_false ££CARWASH02 00D6: if 0 00FE: actor $PLAYER_ACTOR 0 ()near_point 2454.918 -1461.145 24.236 radius 6.0 6.0 4.0 004D: jump_if_false ££CARWASH02 0002: jump ££CARWASH04 |
I loosened up the timings for the location sniffs as 0 was WAY too high priority. Once you establish the location of other car washes, turning some of these into coordinate arrays should have you well under way Good luck with the fades and what not.
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Demarest  |
|
what could be

Group: BUSTED!
Joined: Jul 12, 2003

|
| QUOTE (Zelius @ Aug 24 2005, 10:23) | | Great idea, but is there any way to have it not fix up your car while cleaning it? I think Pay'n'Spray already serves that purpose well enough. | That's purely graphical. As the code indicates, your car retains its original health.
@Karyjee: If you don't download it from Craig or myself, you're taking a big risk at using an out of date Builder.
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Demarest  |
|
what could be

Group: BUSTED!
Joined: Jul 12, 2003

|

"I don't need your guys' version but when I use a different one, I get the same error that your guys' version is different to solve."

Thank you for making my point.
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Krayjee  |
|
[Half] (South) Korean pride!

Group: Members
Joined: Jun 20, 2005


|
Alright the other problem is fixed, thanks to Demarest, but now I have another, Demarest tried helping out, but I couldn't quite find what was wrong. I do everything that it says to do, put the '004F: create_thread ££CARWASH' with the large batch of create_threads, (shown in the background of the screenshot). I place the other codes, I tried yours, then Demarest's, above -------mission 0--------. Yet, I get this problem when trying to compile. Partway through, this occurs... http://img400.imageshack.us/my.php?image=m...lemmb0332ev.png
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Demarest  |
|
what could be

Group: BUSTED!
Joined: Jul 12, 2003

|
Demarest slaps own forehead I can't believe I missed it before. Ironically, I only caught it because you posted it where the code was in the topic 
The first line of my code is CARWASH02. So your create_thread should point to that label, not just CARWASH. That's what I was saying in PM about they have to match. You're saying create_thread CARWASH, but no section has CARWASH as its label. demon accidentally handed you a faulty call line.
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Krayjee  |
|
[Half] (South) Korean pride!

Group: Members
Joined: Jun 20, 2005


|
| QUOTE (demonj0e @ Aug 25 2005, 06:44) | he he sorry i updated top post now
no you do not need the patch because it creates a clean car for you |
odd.... I gotta try that out again then... noo it didn't help. I took a dirty Infernus in there, and it just kinda reset my car , reset the radio, as if it put me in a new car, (i'm pretty sure thats how it should work) no fading, etc. the car stayed exactly the same though. no more or less dirt.... There's no visible marker either, I just go in, and it does what I said. This post has been edited by Krayjee on Aug 25 2005, 08:01
|
|
|
|
|
 |
|
 |
|
|
|
|