#1 Re: GTA Modding » Put_trailer on_cab » 30-08-2008 17:37

I still don't have the scripts working. Even when using 00A5 as opcode. Maybe someone can provide a working script?

#2 Re: GTA Modding » Put_trailer on_cab » 20-05-2008 16:23

Yarik wrote:

Does it work?

{$CLEO}
0A95: enable_thread_saving

    014B: 1@ = init_parked_car_generator #petro color -1 -1 1 alarm 0 door_lock 0 0 10000 at 1648.537 -1068.407 24.378 angle 180.0
    014C: set_parked_car_generator 1@ cars_to_generate_to 101
    014B: 2@ = init_parked_car_generator #petrotr color -1 -1 1 alarm 0 door_lock 0 0 10000 at 1648.537 -1059.974 24.378 angle 180.0
    014C: set_parked_car_generator 2@ cars_to_generate_to 101

wait 10
0893: put_trailer 2@ on_cab 1@
    


0A93: end_custom_thread

Maybe you need longer WAIT ?

This script works half. I get no crash, but it's only spawning the cab, not even the trailer.

{$CLEO}
0A95: enable_thread_saving

    014B: 1@ = init_parked_car_generator #petrotr color -1 -1 1 alarm 0 door_lock 0 0 10000 at 1648.537 -1068.407 24.378 angle 180.0
    014C: set_parked_car_generator 1@ cars_to_generate_to 101
    wait 100
    014B: 2@ = init_parked_car_generator #petro color -1 -1 1 alarm 0 door_lock 0 0 10000 at 1648.537 -1068.407 24.378 angle 180.0
    014C: set_parked_car_generator 2@ cars_to_generate_to 101

wait 100
0893: put_trailer 1@ on_cab 2@
    


0A93: end_custom_thread

Doesn't spawn me a cab, but just the trailer.

Also tried loading the models before spawning them, but it's no go.

I attached a screenshot, using the Yarik's script.

Edit: Added 2nd screenshot. As you can see, cab and trailer are spawning right now, but nothing happens to attatching.

#3 Re: GTA Modding » Put_trailer on_cab » 19-05-2008 20:21

{$CLEO .cs}
   0A95: enable_thread_saving

if
   0@ == 0
then
   00A5: 1@ = create_car #petro at 1648.537 -1068.407 24.378 angle 180.0
   00A5: 2@ = create_car #petrotr at 1648.537 -1059.974 24.378 angle 180.0  
wait 10
   0893: put_trailer 2@ on_cab 1@
   
   0@ = 1
end
   0A93: end_custom_thread

Well, got this, but GTA still crashes.

{$CLEO .cs}
    0A95: enable_thread_saving

if
    0@ == 0
then
    00A5: $1 = create_car #petrotr at 1648.537 1068.407 24.378 angle 180.0 
    wait 500
    00A5: $2 = create_car #petro at 1648.537 -1068.407 24.378 angle 180.0   
    wait 10
    0893: put_trailer $1 on_cab $2
    
    0@ = 1
end
    0A93: end_custom_thread

I also tried this, but still doesn't work.

#4 Re: GTA Modding » Put_trailer on_cab » 10-05-2008 16:36

Seemann wrote:

opcode 014B does not create a vehicle instantly. You need to use 00A5 to create a truck & trailer, and then attach the trailer with 0893. Search for examples of using 00A5.

Thanks for the help.

Seemann wrote:

Also, your script is executed only once. To make a mass spawn you need an endless loop, I think.

Yes, I know. But I'm trying to spawn one truck to test this. If it works, I'm going to create an endless loop.

#5 GTA Modding » Put_trailer on_cab » 09-05-2008 21:51

Eyon
Replies: 10

I have some code here:

{$CLEO}
0A95: enable_thread_saving

if
    0@ == 0
then
    014B: 1@ = init_parked_car_generator #petro color -1 -1 1 alarm 0 door_lock 0 0 10000 at 1648.537 -1068.407 24.378 angle 180.0
    014C: set_parked_car_generator 1@ cars_to_generate_to 101
    014B: 2@ = init_parked_car_generator #petrotr color -1 -1 1 alarm 0 door_lock 0 0 10000 at 1648.537 -1059.974 24.378 angle 180.0
    014C: set_parked_car_generator 2@ cars_to_generate_to 101

wait 10
0893: put_trailer 2@ on_cab 1@
    
    0@ = 1
end
0A93: end_custom_thread

But the trailer isn't attaching to the cabine. I'm trying to create a mass spawn for trucks, but as long this ain't working, I can't get it offcourse. So can anyone tell what I'm doing wrong?

#6 Re: GTA Modding » Need a (little?) script to do something with the cars » 22-03-2008 03:08

Well, I'm looking for a script wich opens the doors and when pressing the same button, the doors close. Something with open_component, but I can't close them after using open_component, so I'm looking for something wich make it possible.

#7 GTA Modding » Need a (little?) script to do something with the cars » 03-03-2008 14:54

Eyon
Replies: 3

Hi,

I'm new within the SA modding scene, and I'm trying to find a (cleo) script (or tut) to make the doors of the cars open and last but not least to close the doors also.

Can someone help me?

Board footer

Powered by FluxBB