Jump to content

Problems with open car


CroModder

Recommended Posts

Hy! I am new in forum and i have problems so i created new topic.

Like firs i don't now english well so it will be some mistakes in my texts.

Here is my problem:

I made it to elegant spawn in grove street and that is work.

But then i tried to open elegant's hood and when i compilied script show no errors. Then I run SA and loading was successful but then game crashed and the error showed up. Where i made a mistake??? sad.gif

 

Error :

user posted image

 

Firs I tried with this code :

 

014B: $GROVE_CAR_OPEN = init_parked_car_generator #ELEGANT color -1 -1  1 alarm  0 door_lock  0  0  10000 at  2457.891 -1674.698  13.50193 angle  90.0 014C: set_parked_car_generator $GROVE_CAR_OPEN cars_to_generate_to  1010657: car $GROVE_CAR_OPEN open_car_component 0

 

 

And then i tried with this code :

 

014B: $GROVE_CAR_OPEN = init_parked_car_generator #ELEGANT color -1 -1  1 alarm  0 door_lock  0  0  10000 at  2457.891 -1674.698  13.50193 angle  90.0 014C: set_parked_car_generator $GROVE_CAR_OPEN cars_to_generate_to  1010657: $GROVE_CAR_OPEN open_car_component 0

 

Edited by CroModder
Link to comment
Share on other sites

grahamdodds9

 

Hy! I am new in forum and i have problems so i created new topic.

Like firs i don't now english well so it will be some mistakes in my texts.

Here is my problem:

I made  it to elegant spawn in grove street and that is work.

But then i tried to open elegant's hood and when i compilied script show no errors. Then I run SA and loading was successful but then game crashed and the error showed up. Where i made a mistake??? sad.gif

 

Error :

user posted image

 

Firs I tried with this code :

 

014B: $GROVE_CAR_OPEN = init_parked_car_generator #ELEGANT color -1 -1  1 alarm  0 door_lock  0  0  10000 at  2457.891 -1674.698  13.50193 angle  90.0 014C: set_parked_car_generator $GROVE_CAR_OPEN cars_to_generate_to  1010657: car $GROVE_CAR_OPEN open_car_component 0

 

 

And then i tried with this code :

 

014B: $GROVE_CAR_OPEN = init_parked_car_generator #ELEGANT color -1 -1  1 alarm  0 door_lock  0  0  10000 at  2457.891 -1674.698  13.50193 angle  90.0 014C: set_parked_car_generator $GROVE_CAR_OPEN cars_to_generate_to  1010657: $GROVE_CAR_OPEN open_car_component 0

 

 

Reinstall the game.

 

 

Edited by grahamdodds9

Moved into the BUSTED group upon request.

Link to comment
Share on other sites

Look, My GTASA will work without this code. But I wont to spawn my car with some open and broken car components. Edited by CroModder
Link to comment
Share on other sites

$GROVE_CAR_OPEN is not a car variable, it's simply the handle of the car GENERATOR. That's why it crashes.

 

Perhaps you should take some time to look at some tutorials, rather than complaining in this and other threads... dozingoff.gif

Link to comment
Share on other sites

 

$GROVE_CAR_OPEN is not a car variable, it's simply the handle of the car GENERATOR. That's why it crashes.

 

Perhaps you should take some time to look at some tutorials, rather than complaining in this and other threads...  dozingoff.gif

No man, this variable work becouse i found a car where i put it. So there is no problem. When you put some letters for variable insted of numbers and compile, close program and then when you open a program there are no more letters. (They are replaced for numbers)

So i think that is a problem in this code:

0657: car $GROVE_CAR_OPEN open_car_component 0

It must be!

Link to comment
Share on other sites

Look.

 

The variable in there is for the GENERATOR ONLY. 0657: requires a variable for a CAR, not a GENERATOR.

 

00A5 and 014B are NOT the same.

Link to comment
Share on other sites

Look.

 

The variable in there is for the GENERATOR ONLY. 0657: requires a variable for a CAR, not a GENERATOR.

 

00A5 and 014B are NOT the same.

Yeah, sorry. But if this ($GROVE_CAR_OPEN) is variable for generator what is variable for car?

014B: $GROVE_CAR_OPEN = init_parked_car_generator #ELEGANT color -1 -1 1 alarm 0 door_lock 0 0 10000 at 2457.891 -1674.698 13.50193 angle 90.0

Link to comment
Share on other sites

There is none. When you are in range it's pretty much a random car. Perhaps 014B isn't the opcode you want to use there...

Link to comment
Share on other sites

There is none. When you are in range it's pretty much a random car. Perhaps 014B isn't the opcode you want to use there...

Maybe. But if 014B isn't opcode i can use then which opcode can i use? cryani.gif

If you now how to resolve a problem please give me a code that i can take a look for it and maybe something learned.

Link to comment
Share on other sites

Look.

 

The variable in there is for the GENERATOR ONLY. 0657: requires a variable for a CAR, not a GENERATOR.

 

00A5 and 014B are NOT the same.

rolleyes.gif

Link to comment
Share on other sites

Bu I don't now how to use opcode 0657 and 00A5 so I ask you to give me a finished code that I can just edit co-ordinates and stuff?

So please give me code if you can.

EDIT:

 

005A: @3 += @1;; integer values

 

What that code is doing???

EDIT2:

I also tried but that eather don't working:

 

014B: $11059 = init_parked_car_generator $11060 color -1 -1  1 alarm  0 door_lock  0  0  10000 at  2457.891 -1674.698  13.50193 angle  30.0 014C: set_parked_car_generator $11059 cars_to_generate_to  1010657: open_car $11060 component  28137: car $11060 id == #ELEGY 0006: $11060 =  1 ;; integer values

 

Edited by CroModder
Link to comment
Share on other sites

 

Bu I don't now how to use opcode 0657 and 00A5 so I ask you to give me a finished code that I can just edit co-ordinates and stuff?

So please give me code if you can.

EDIT:

 

005A: @3 += @1;; integer values

 

What that code is doing???

EDIT2:

I also tried but that eather don't working:

 

014B: $11059 = init_parked_car_generator $11060 color -1 -1  1 alarm  0 door_lock  0  0  10000 at  2457.891 -1674.698  13.50193 angle  30.0 014C: set_parked_car_generator $11059 cars_to_generate_to  1010657: open_car $11060 component  28137: car $11060 id == #ELEGY 0006: $11060 =  1;; integer values

 

My post doesn't say to use 005A. And, I'm pretty sure I suggested using something OTHER than 014B.

 

I've given you the answer three times in this thread now; I can't make it much clearer without flat out telling you, which I'm not going to do. biggrin.gif I'd strongly suggest looking into tutorials. Even better would be to look at the original code, and see how they do it.

Link to comment
Share on other sites

I read all tutorials and I'm not resolved a problem. cryani.gif

 

Even better would be to look at the original code, and see how they do it.

I wrote this code looking at the original codes in scm file.

 

 

And, I'm pretty sure I suggested using something OTHER than 014B.

Which code I can use instead 014B??? sad.gif

Link to comment
Share on other sites

 

Look.

 

The variable in there is for the GENERATOR ONLY. 0657: requires a variable for a CAR, not a GENERATOR.

 

00A5 and 014B are NOT the same.

mercie_blink.gif

Link to comment
Share on other sites

Look.

 

The variable in there is for the GENERATOR ONLY. 0657: requires a variable for a CAR, not a GENERATOR.

 

00A5 and 014B are NOT the same.

mercie_blink.gif

I now that he variable in there is for the generator only, I now that 0657: requires a variable for a CAR, not a generator and I now that 00A5 and 014B are NOT the same BUT I DON'T NOW WHY THAT ISN'T WORKING! I TRIED EVERYTHING AND I LOOKED UP FOR ORIGINAL CODE BUT NOTHING ISN'T WORKING!!! angry.gif

Just give me a COMPLETED code or I will quit with editing a main.scm because I don't now haw I CAN LEARN SCRIPTING!!!

Link to comment
Share on other sites

 

Look.

 

The variable in there is for the GENERATOR ONLY. 0657: requires a variable for a CAR, not a GENERATOR.

 

00A5 and 014B are NOT the same.

mercie_blink.gif

I now that he variable in there is for the generator only, I now that 0657: requires a variable for a CAR, not a generator and I now that 00A5 and 014B are NOT the same BUT I DON'T NOW WHY THAT ISN'T WORKING! I TRIED EVERYTHING AND I LOOKED UP FOR ORIGINAL CODE BUT NOTHING ISN'T WORKING!!! angry.gif

Just give me a COMPLETED code or I will quit with editing a main.scm because I don't now haw I CAN LEARN SCRIPTING!!!

All the answers are in front of you; this is as far as I go.

 

"GIMMIE GIMMIE GIMMIE" won't get you very far around here...

 

EDIT: Aw hell, why not try ONE more time...

 

http://sa-db.webtools4you.net/?search=00a5&show=all

Link to comment
Share on other sites

OK. I continue trying and when I wrote this code bellow I was sure that this is it but the game still crashes after load is finished. angry.gif

 

 

00A5: $11061 = create_vehicle #GREENWOO at  2457.891 -1674.698  13.501930175: set_car $11061 z_angle_to  285.0

 

 

I don't have idea what's wrong in this code because i copy this code from main.scm

Link to comment
Share on other sites

When using 00A5 (way to catch on, BTW), you need to load the models first. Since you already know the model name and the coordinates, all you need to do now is to find a block of code in the main.scm that deals with loading models. Hint: You can usually find this at the beginning of a mission, either before or after the cutscene info. Don't copy that code verbatim; adapt it to fit the parameters you already have.

Link to comment
Share on other sites

I have load the model but the game is still crashes.I don't now what else i can try.

 

0247: request_model #PONY8248:   NOT   model #PONY available00A5: $11061 = create_vehicle #PONY at  2457.891 -1674.698  13.50193 ;; Load the vehicle model before using this

 

Link to comment
Share on other sites

Sort of right, except you're missing the whole "IF" check part. 0248 is a conditional opcode, meaning it's used to check if a certain condition is met, in this case, we're checking to see if the model has indeed loaded, and if not, we want it to "jump if false" back to the beginning of the loop until it has loaded. If it has, we want move on to the actual car creation code.

 

So some psudeo-code might look like this (this is Sanny Builder; Mission Builder will be slightly different but the same concept)

 

 

:mylabelrequest model #PONYif 0model #PONY availablejf @mylabel$MY_GROVE_CAR = create_car #PONY @ coordsset $MY_GROVE_CAR z_angle 90.0$MY_GROVE_CAR open_component 0 // Opens the hood

 

 

See? Not that hard. tounge2.gif

Edited by ceedj
Link to comment
Share on other sites

Thx man. But it wasn't that easy because I was lost my mind searching codes in main.scm.

Here is my result :

 

user posted image

Link to comment
Share on other sites

I have founded two problems :

1. when I add second car with open hood or trunk game crashes.

2. I can't change weapons. (when I use cheat for weapons "KJKSZPJ" I can't select next or previous weapon)

Here is a pic to show you where I put my code:

user posted image

Link to comment
Share on other sites

  • 3 weeks later...
  • 10 months later...

Uh, I have problem again. confused.gif

What's wrong with this code:

 

:PEUGEOTthread 'PEUGEOT' Model.Load(#BRAVURA)if   not Model.Available(#BRAVURA)else_jump @PEUGEOT 772@ = Car.Create(772@, 2522.586, -1525.625, 23.81385)Car.Angle(772@) = 90end_thread 

 

 

I put it in the bottom of the "main"

 

And I put create_thread with other create_threads in "main".

 

PS: "772@ = Car.Create(772@"

 

I tried to put different numbers. (example: 333@ = Car.Create(772@)

 

EDIT: Oh, now I saw what can be problem, maybe instead of model.load I must put request model.. but I will try this tomorrow because I lost all day trying to figure this out...

Edited by CroModder
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

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