Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Diamond Casino Heist
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Red Dead Online

      1. Frontier Pursuits
      2. Find Lobbies & Outlaws
      3. Help & Support
    3. Crews

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Redemption

    1. Grand Theft Auto Series

    2. GTA 6

      1. St Andrews Cathedral
    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    3. Gangs

    1. Announcements

    2. Support

    3. Suggestions

Sign in to follow this  
sirusxxxx

Parked Cars Components And Tuning

Recommended Posts

sirusxxxx

First problem is the "parked car" spawns in the middle of the street instead of the coordinates I have entered.

 

The second problem is I cant get the "parked car" to spawn with the hood open to show the engine off.

 

If anyone knows any solutions or suggestions to cleaning this script up please help thanks!

 

 

 

{$CLEO .cs}//-------------MAIN---------------thread 'TUNEP' :TUNEP_11wait 0 if Model.Load(#SLAMVAN)06E9: load_car_component #HYDRALICS 06E9: load_car_component #NTO_B_S 06E9: load_car_component #FBB_LR_SLV1 :TUNEP_39wait 0 if and Model.Available(#SLAMVAN)06EA:   car_component #HYDRALICS available 06EA:   car_component #NTO_B_S available 06EA:   car_component #FBB_LR_SLV1 available else_jump @TUNEP_39 [email protected] = Car.Create(#SLAMVAN, 701.7091, -453.7511, 16.33594)Car.Angle([email protected]) = 180.006E7: [email protected] = add_car_component #NTO_B_S to_car [email protected] 06E7: [email protected] = add_car_component #HYDRALICS to_car [email protected] 06E7: [email protected] = add_car_component #FBB_LR_SLV1 to_car [email protected] 0229: set_car [email protected] primary_color_to 1 secondary_color_to 1 06ED: set_car [email protected] paintjob 1 06EB: release_car_component #HYDRALICS 06EB: release_car_component #NTO_B_S 06EB: release_car_component #FBB_LR_SLV1 0249: release_model #SLAMVANModel.Destroy(#HYDRALICS)Model.Destroy(#NTO_B_S)Model.Destroy(#FBB_LR_SLV1)Model.Destroy(#SLAMVAN)0A93: end_custom_thread

 

Edited by sirusxxxx

Share this post


Link to post
Share on other sites
2pacproducer2

 

First problem is the "parked car" spawns in the middle of the street instead of the coordinates I have entered.

 

Thats because you need to make a check that checks if player is near that coords in radius of like 100.0, if yes, then creates the car. And at the end of the script the same check again, if the player isn't in the coords in radius of 100.0 then car destroy instantly and jump to the beggining of the code.

Share this post


Link to post
Share on other sites
2pacproducer2

And the second problem.

You want to spawn a car with hood removed ?

You need to create the car at coords of 0.0 0.0 0.0 and the remove the hood, I think its car component 0 , and then put car at the coords you want.

 

Use the opcodes search function to find all the opcodes I mentioned.

Share this post


Link to post
Share on other sites
sirusxxxx

So to open the hood I just edit the code like this??

 

 

 

{$CLEO .cs}

 

//-------------MAIN---------------

thread 'TUNEP'

 

:TUNEP_11

wait 0

if

Model.Load(#SLAMVAN)

06E9: load_car_component #HYDRALICS

06E9: load_car_component #NTO_B_S

06E9: load_car_component #FBB_LR_SLV1

 

:TUNEP_39

wait 0

if and

Model.Available(#SLAMVAN)

06EA: car_component #HYDRALICS available

06EA: car_component #NTO_B_S available

06EA: car_component #FBB_LR_SLV1 available

else_jump @TUNEP_39

[email protected] = Car.Create(#SLAMVAN, 0.0, 0.0, 0.0)

Car.Angle([email protected]) =0.0

06E7: [email protected] = add_car_component #NTO_B_S to_car [email protected]

06E7: [email protected] = add_car_component #HYDRALICS to_car [email protected]

06E7: [email protected] = add_car_component #FBB_LR_SLV1 to_car [email protected]

0229: set_car [email protected] primary_color_to 1 secondary_color_to 1

06ED: set_car [email protected] paintjob 1

08A6: set_vehicle @0 component 0 rotation_to @1

06EB: release_car_component #HYDRALICS

06EB: release_car_component #NTO_B_S

06EB: release_car_component #FBB_LR_SLV1

0249: release_model #SLAMVAN

Model.Destroy(#HYDRALICS)

Model.Destroy(#NTO_B_S)

Model.Destroy(#FBB_LR_SLV1)

Model.Destroy(#SLAMVAN)

[email protected] = Car.Create(#SLAMVAN, 701.7091, -453.7511, 16.33594)

Car.Angle([email protected]) = 180.0

0A93: end_custom_thread

 

 

Well I will have to figure out the whole player check thing now hehe!

Share this post


Link to post
Share on other sites
james227uk

 

08A6: set_vehicle @0 component 0 rotation_to @1

 

 

That will crash. Firstly, the @ is on the wrong side of the number. It will try to get vehicle @1 but there's no car. Just a label.

 

Even corrected:

 

 

08A6: set_vehicle [email protected] component 0 rotation_to [email protected]

 

 

Will crash because your setting the rotation to a defined car part. Crash.

 

 

 

0689: set_car CAR remove_componentA 0 visible_effect_flag 0 

 

 

I think that's what you need, but I don't know. I've never needed/used this opcode before.

 

(There's a B vesion of that opcode too)

 

Share this post


Link to post
Share on other sites
OrionSR

If you want the hood raised on your vehicle then try this code from the Burning Desire mission.

 

0657: car [email protected] open_componentA 0 

 

Share this post


Link to post
Share on other sites
ZAZ

 

If you want the hood raised on your vehicle then try this code from the Burning Desire mission.

 

0657: car [email protected] open_componentA 0 

 

Do you know how to shatter the windscreen in peaces?

Share this post


Link to post
Share on other sites
sirusxxxx

JAMES AND ORION

Thanks Ill try those opcodes to open the hood, I will also have this one to try as well:

 

 

067F: car @0 open_car_component 2

 

 

 

 

 

ZAZ

Try this code but I dont remeber the windsheild component number though

 

 

0689: car @1 break_car_component 2 1 (As seen in "Stowaway")

 

Edited by sirusxxxx

Share this post


Link to post
Share on other sites
sirusxxxx

Okay I am working on the first problem and added a check can someone tell me if I put the destory models in the right place before the jump loop or are they suppose to go somewhere else?

 

 

Now I got a new problem:

When I enter the car and drive away one or two cars spawn immediately before I even get a chance to leave the spawn coordinates area, how do I fix this?

 

So maybe the car waits for a few minutes before spawning or doesnt spawn again until I drive away?

 

 

 

 

 

Once I am done this I can work on the second problem biggrin.gif

Edited by sirusxxxx

Share this post


Link to post
Share on other sites
OrionSR

Try opcode 00EC:, which doesn't care if CJ is on foot or in a vehicle.

 

Added: Opcodes 00FE: and 80FF: don't appear to match the descriptions in your script.

Edited by OrionSR

Share this post


Link to post
Share on other sites
james227uk

Before the jump at the end of the script, add

 

 

wait 60000

 

 

Change it to what you like. 1000 = 1 second

Share this post


Link to post
Share on other sites
sirusxxxx

OrionSR

Okay thanks once I found the correct opcodes for those two that were wrong it finally spawns without having to change the wait time biggrin.gif

 

 

Now to work on the car components confused.gif

Edited by sirusxxxx

Share this post


Link to post
Share on other sites
Deji

Seeing as there's alot of questiosn for these things here, I'll add mine.

 

Now, I know there is no opcode for this (not that I know of, anyway) but does anyone know a way to repair a car component that has been damaged? Like, a specific one. Not all of the car.

 

I want to repair the headlights, in which I've broken.

 

I've tried these:

 

 

068A: set_car $RYDER_CAR repair_componentA 20698: set_car [email protected] repair_componentB 4

 

 

But they don't seem to work... Or maybe I haven't found the right parameter for the headlights yet (I tried a few).

 

Some sort of memory adress, maybe?

 

 

Anyone who can help with this gets ma respect and cookies smile.gif Been driving me mad.

Share this post


Link to post
Share on other sites
james227uk

Here's the solution: Make a new topic

 

This topic is for sirusxxxx's problems, not yours.

Share this post


Link to post
Share on other sites
Deji

 

Here's the solution: Make a new topic

 

This topic is for sirusxxxx's problems, not yours.

Chill out... I hear this place is called a "comunity" for a reason... I've found the solution anyway so really making a new topic would've been a waste of time... Never heard you complain when ZAZ asked a question. dozingoff.gif

Share this post


Link to post
Share on other sites
OrionSR

So what is the solution? I wasn't having much luck. Did you happen to make a list of which parts were associated with the numbers of the various opcodes?

Share this post


Link to post
Share on other sites
sirusxxxx

james227uk

Thread Jacking Isnt Cool Because Now I Have No Idea What Everyone Is Talking About

 

OrionSR

Do you mean which opcodes I corrected in my script or do you mean the opcodes for opening car components?

Share this post


Link to post
Share on other sites
Deji

 

So what is the solution? I wasn't having much luck. Did you happen to make a list of which parts were associated with the numbers of the various opcodes?

There's no opcode. Just use a memory address smile.gif

 

 

03C0: [email protected] = actor $PLAYER_ACTOR car0A97: [email protected] = car [email protected] [email protected] += 0x5A00AA6: call_method 0x006C2100 struct [email protected] num_params 2 pop 0 1 0 // broken front left headlight.0AA6: call_method 0x006C2100 struct [email protected] num_params 2 pop 0 1 1 // broken front right headlight.

 

 

And to fix em again:

 

 

0AA6: call_method 0x006C2100 struct [email protected] num_params 2 pop 0 0 1 // fix front right headlight.0AA6: call_method 0x006C2100 struct [email protected] num_params 2 pop 0 0 0 // fix front left headlight

 

 

Second pop parameter is the status of the headlight. Third pop parameter is the actual headlight. 1 is the right one, 0 is the left one wink.gif

 

@sirus - think he was talking to me... I also think the info I posted answers your last question?

Share this post


Link to post
Share on other sites
james227uk

 

Here's the solution: Make a new topic

 

This topic is for sirusxxxx's problems, not yours.

Chill out... I hear this place is called a "comunity" for a reason... I've found the solution anyway so really making a new topic would've been a waste of time... Never heard you complain when ZAZ asked a question. dozingoff.gif

No, this place isn't called a "comunity" it's called a Community. Besides, I didn't see ZAZ ask a question. Even If I did, ZAZ very rarely asks questions anyway. No problem with that.

 

@Sirusxxx

 

Have you not a brain? If you had any intelligence you would see I was talking to Deji, I wasn't even talking to you so If you don't understand then get over it.

Edited by james227uk

Share this post


Link to post
Share on other sites
ZAZ

 

First problem is the "parked car" spawns in the middle of the street instead of the coordinates I have entered.

 

The second problem is I cant get the "parked car" to spawn with the hood open to show the engine off.

 

If anyone knows any solutions or suggestions to cleaning this script up please help thanks!

 

 

 

{$CLEO .cs}//-------------MAIN---------------thread 'TUNEP' :TUNEP_11wait 0 if Model.Load(#SLAMVAN)06E9: load_car_component #HYDRALICS 06E9: load_car_component #NTO_B_S 06E9: load_car_component #FBB_LR_SLV1 :TUNEP_39wait 0 if and Model.Available(#SLAMVAN)06EA:   car_component #HYDRALICS available 06EA:   car_component #NTO_B_S available 06EA:   car_component #FBB_LR_SLV1 available else_jump @TUNEP_39 [email protected] = Car.Create(#SLAMVAN, 701.7091, -453.7511, 16.33594)Car.Angle([email protected]) = 180.006E7: [email protected] = add_car_component #NTO_B_S to_car [email protected] 06E7: [email protected] = add_car_component #HYDRALICS to_car [email protected] 06E7: [email protected] = add_car_component #FBB_LR_SLV1 to_car [email protected] 0229: set_car [email protected] primary_color_to 1 secondary_color_to 1 06ED: set_car [email protected] paintjob 1 06EB: release_car_component #HYDRALICS 06EB: release_car_component #NTO_B_S 06EB: release_car_component #FBB_LR_SLV1 0249: release_model #SLAMVANModel.Destroy(#HYDRALICS)Model.Destroy(#NTO_B_S)Model.Destroy(#FBB_LR_SLV1)Model.Destroy(#SLAMVAN)0A93: end_custom_thread

 

Don't spawn the car immediately by gameload.

Beginn your script allways with a Loop in defaulft state including a check to activate the mod action.

So your car should spawn if the player is near the render area, maybe 80.0 till 100.0 units

 

if 00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 701.7091 -453.7511 16.33 radius 80.0 80.0 50.0 jf @TUNEP_11

 

 

 

Now I got a new problem:

When I enter the car and drive away one or two cars spawn immediately before I even get a chance to leave the spawn coordinates area, how do I fix this?

So maybe the car waits for a few minutes before spawning or doesnt spawn again until I drive away?

 

After player arrived at that place and the car appeared should the code run again in a Loop to check if the player left the spawn area.

This area check should have a bigger radius

and you should use opcode 00FE which checks the location visit in every case instead of opcode 00FF, which checks only if player is on foot or 00EE which checks only if player is in a vehicle.

 

Negation- (opposite) -version of opcodes are done by changing the first ciro into eight

00FE: -> 80FE:

and using the not keyword

 

 

if 80FE:   not actor $PLAYER_ACTOR sphere 0 in_sphere 701.7091 -453.7511 16.33 radius 90.0 90.0 90.0 jf @TUNEP_253

 

 

Use 0657: to open the hood

 

0657: car [email protected] open_componentA 0

 

 

 

can someone tell me if I put the destory models in the right place before the jump loop or are they suppose to go somewhere else?

At first you must understand the difference between Model.Destroy(#SLAMVAN) and Car.Destroy([email protected]) or Car.RemoveReferences([email protected])

In the script variation with writing opcodes is it more clear

difference between 0249: release_model #SLAMVAN and 00A6: destroy_car [email protected] or 01C3: remove_references_to_car [email protected]

 

The Model.Destroy or opcode 0249: frees the engine or memory from the loaded model file which is need to spawn the item.

Car.Destroy or opcode 00A6: belongs to the instance of a created vehicle which is allways defined with a variable name.

 

You should release the loaded model file when the item is created and the model file is nevermore needed.

 

You should release the created instance of an item if the script action is finished.

Then you can start the script from beginning and can use again the same variable name to create the item again.

 

The equivalent for tuningparts exist only to release the loaded model file.

A release of the instance of an attached tuningpart is not necessary.

 

 

 

 

 

The script:

 

{$CLEO .cs}//-------------MAIN---------------thread 'TUNEP' :TUNEP_11wait 0 if   Player.Defined($PLAYER_CHAR)jf @TUNEP_11 if 00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 701.7091 -453.7511 16.33 radius 80.0 80.0 50.0 jf @TUNEP_11 Model.Load(#SLAMVAN)06E9: load_car_component #HYDRALICS 06E9: load_car_component #NTO_B_S 06E9: load_car_component #FBB_LR_SLV1 :TUNEP_99wait 0 if and  Model.Available(#SLAMVAN)06EA:   car_component #HYDRALICS available 06EA:   car_component #NTO_B_S available 06EA:   car_component #FBB_LR_SLV1 available jf @TUNEP_99 [email protected] = Car.Create(#SLAMVAN, 701.7091, -453.7511, 16.33594)Car.Angle([email protected]) = 180.006E7: [email protected] = add_car_component #NTO_B_S to_car [email protected] 06E7: [email protected] = add_car_component #HYDRALICS to_car [email protected] 06E7: [email protected] = add_car_component #FBB_LR_SLV1 to_car [email protected] 0229: set_car [email protected] primary_color_to 1 secondary_color_to 1 0209: [email protected] = random_int_in_ranges 0 2 06ED: set_car [email protected] paintjob [email protected] 0657: car [email protected] open_componentA 0 06EB: release_car_component #HYDRALICS 06EB: release_car_component #NTO_B_S 06EB: release_car_component #FBB_LR_SLV1 Model.Destroy(#SLAMVAN):TUNEP_253wait 0 if   Player.Defined($PLAYER_CHAR)jf @TUNEP_253 if 80FE:   not actor $PLAYER_ACTOR sphere 0 in_sphere 701.7091 -453.7511 16.33 radius 90.0 90.0 90.0 jf @TUNEP_253 Car.RemoveReferences([email protected])jump @TUNEP_11

 

Share this post


Link to post
Share on other sites
Kookas
Here's the solution: Make a new topic

 

This topic is for sirusxxxx's problems, not yours.

Chill out... I hear this place is called a "comunity" for a reason... I've found the solution anyway so really making a new topic would've been a waste of time... Never heard you complain when ZAZ asked a question. dozingoff.gif

No, this place isn't called a "comunity" it's called a Community. Besides, I didn't see ZAZ ask a question. Even If I did, ZAZ very rarely asks questions anyway. No problem with that.

 

@Sirusxxx

 

Have you not a brain? If you had any intelligence you would see I was talking to Deji, I wasn't even talking to you so If you don't understand then get over it.

You know, there is no reason for you to be so damn rude and in everyone's face like you're something special. Sometimes things aren't obvious, even if you think they are.

Share this post


Link to post
Share on other sites
ZAZ

 

Here's the solution: Make a new topic

 

This topic is for sirusxxxx's problems, not yours.

Chill out... I hear this place is called a "comunity" for a reason... I've found the solution anyway so really making a new topic would've been a waste of time... Never heard you complain when ZAZ asked a question. dozingoff.gif

No, this place isn't called a "comunity" it's called a Community. Besides, I didn't see ZAZ ask a question. Even If I did, ZAZ very rarely asks questions anyway. No problem with that.

 

@Sirusxxx

 

Have you not a brain? If you had any intelligence you would see I was talking to Deji, I wasn't even talking to you so If you don't understand then get over it.

You know, there is no reason for you to be so damn rude and in everyone's face like you're something special. Sometimes things aren't obvious, even if you think they are.

This is Sirusxxx's topic and you should send james227uk a pm for that message

I wish me that Dutchy delete our two posts

Share this post


Link to post
Share on other sites
sirusxxxx

ZAZ

 

Sorry I should of posted my edited script I already changed most of what you mentioned except I didnt know about the destroy components and models part, so I must thank you for this.

 

 

Anyways here is a movie of the script I made for the Dillimore's Tuning Shop, I still have some work to do like have them only spawn durning a specific time at night, instead of all the time so any help would be great!

 

 

 

Edited by sirusxxxx

Share this post


Link to post
Share on other sites
ZAZ

 

ZAZ

 

Sorry I should of posted my edited script I already changed most of what you mentioned except I didnt know about the destroy components and models part, so I must thank you for this.

 

 

Anyways here is a movie of the script I made for the Dillimore's Tuning Shop, I still have some work to do like have them only spawn durning a specific time at night, instead of all the time so any help would be great!

 

VIDEO OF MY SCRIPT

Don't know if the user is happy when he must come to another time.

Alternative you could make a fade and change the time when he enters the spot.

 

Look in CLEO Script Tutorial--->Give access with math coding

for the theme: Time check for game hours

 

Btw. nice vid icon14.gif

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.