Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Criminal Enterprises
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

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

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

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

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

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    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. Design Your Own Mission
      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
    1. Announcements

    2. Support

    3. Suggestions

*DO NOT* SHARE MEDIA OR LINKS TO LEAKED COPYRIGHTED MATERIAL. Discussion is allowed.

Every car stop at x,y,z


Ify24
 Share

Recommended Posts

Hy guys...

I have a question...

How to make that every car in $x $y $z ( random car, player's car... any car ) stop, then wait 5000 ( 5 sec ) and then move on ???

pls help...

Link to comment
Share on other sites

Something like this?

 

 

:LOOP0327: [email protected] = get_random_car_with_model -1 in_rectangle_cornerA 2000.0 3000.0 cornerB 2000.5 3000.5 if056E:   car [email protected] defined else_jump @LOOP04BA: set_car [email protected] speed_to 0.0 wait 5000 ms01C3: remove_references_to_car [email protected] // Like turning a car into any random car 

 

 

Just change the coordinates on first opcode.

Link to comment
Share on other sites

Something like this?

 

 

:LOOP0327: [email protected] = get_random_car_with_model -1 in_rectangle_cornerA 2000.0 3000.0 cornerB 2000.5 3000.5 if056E:   car [email protected] defined else_jump @LOOP04BA: set_car [email protected] speed_to 0.0 wait 5000 ms01C3: remove_references_to_car [email protected] // Like turning a car into any random car 

 

 

Just change the coordinates on first opcode.

Yeah but when I load my game it shows dark scren and I needed to log off to exit gta:sa with this script :

 

 

{$CLEO .cs}thread "CARSTOP"0A95: enable_thread_saving:LOOP0327: [email protected] = get_random_car_with_model -1 in_rectangle_cornerA -2644.6384 1172.892 cornerB -2644.7 1172.9if056E:   car [email protected] definedelse_jump @LOOP04BA: set_car [email protected] speed_to 0.0wait 5000 ms01C3: remove_references_to_car [email protected] 0A95: enable_thread_saving

 

 

Anyone can help ?

Link to comment
Share on other sites

Why did you enabled thread saving twice?

 

EDIT: I think the best way would be a path, don't you?

Link to comment
Share on other sites

Why did you enabled thread saving twice?

 

EDIT: I think the best way would be a path, don't you?

ThO I didn't notice that... hah..

Link to comment
Share on other sites

That was just an example... How about adding there "wait" and check to see if player is defined? dozingoff.gif

IDK I never really used 0327: opcode before... did I made a mistake at cornerA and cornerB.... what it means ??

Link to comment
Share on other sites

CornerA - Defines one corner of the area

CornerB - Defines second corner of the area

 

And the area between those will be selected.

 

 

{$CLEO .cs}thread "CARSTOP"0A95: enable_thread_saving:LOOPwait 0 msif0256:   player $PLAYER_CHAR defined else_jump @LOOP0327: [email protected] = get_random_car_with_model -1 in_rectangle_cornerA -2644.6384 1172.892 cornerB -2644.7 1172.9if056E:   car [email protected] definedelse_jump @LOOP04BA: set_car [email protected] speed_to 0.0wait 5000 ms01C3: remove_references_to_car [email protected] jump @LOOP

 

 

Maybe that one will work. You might need to use some more effective way to stop the cars.

Link to comment
Share on other sites

But I dont think that will fix something...

 

 

{$CLEO .cs}thread "CARSTOP":LOOPwait 0 msif0256:   player $PLAYER_CHAR definedelse_jump @LOOP0327: [email protected] = get_random_car_with_model -1 in_rectangle_cornerA 2478.2087 -1734.4667  cornerB 2478.3087 -1734.5667 if056E:   car [email protected] definedelse_jump @LOOP04BA: set_car [email protected] speed_to 0.0wait 5000 ms01C3: remove_references_to_car [email protected] @LOOP

 

 

They don't stop...

Pls help...

 

EDIT: Hey guys I know !

Maybe I can edit that random car stop when the traffic light is red... but I can't find script sad.gif ... Maybe I can edit that script .... Anyone help pls....

Edited by Ify24
Link to comment
Share on other sites

Try changing else_jump @LOOP to jf @LOOP.

 

Here's what I do when I have a problem with a script, I use opcode 00BC to print out something to the screen, make it wait a second, and then go on with the script. What this does is it tells you where it is in the code at all times and if you record the messages it gives you, you can see the exact path that the code is taking.

 

 

:LOOP00BC: show_text_highpriority GXT 'InLoop' time 5000 flag 0wait 10000327: [email protected] = get_random_car_with_model -1 in_rectangle_cornerA 2000.0 3000.0 cornerB 2000.5 3000.5 00BC: show_text_highpriority GXT 'MadeCr' time 5000 flag 0wait 1000if056E:   car [email protected] defined else_jump @LOOP00BC: show_text_highpriority GXT 'MadeCar' time 5000 flag 0wait 100004BA: set_car [email protected] speed_to 0.0 00BC: show_text_highpriority GXT 'SetSpd' time 5000 flag 0wait 1000wait 5000 ms00BC: show_text_highpriority GXT 'WaitOvr' time 5000 flag 0wait 100001C3: remove_references_to_car [email protected] // Like turning a car into any random car00BC: show_text_highpriority GXT 'RemRef' time 5000 flag 0wait 1000

 

 

Start the game with this code in place, and record each message as it shows up. I know this particular opcode is probably not the best to use because in practice it's giving you the info because of an error in itself, but it works for what it needs to do.

 

Also, try changing wait 5000 ms to wait 5000. I have never had to add the 'ms' at the end for the game to wait. And let us know what debug code tells you when you start the game. You can get rid of 'missing', which will show up at the end.

Link to comment
Share on other sites

Oh come on guys..I am sure that people like ZAZ, PatrickW, Dutchy and some other great coders can help me with this...Please....

 

Link to comment
Share on other sites

Paths do what you have recorded and then stops. Try to search for that in scm..

 

EDIT: Anyway, you could post it in the request topic, and maybe someone will help you.

Link to comment
Share on other sites

Paths do what you have recorded and then stops. Try to search for that in scm..

 

EDIT: Anyway, you could post it in the request topic, and maybe someone will help you.

Yeah, I already search in main.scm ...

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
 Share

  • 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.