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 Cayo Perico 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. Help & Support
    2. Red Dead Redemption

    1. Grand Theft Auto Series

      1. 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. Guides & Strategies
      2. Help & Support
    6. GTA Vice City

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

      1. Guides & Strategies
      2. 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. 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

      1. GTANet 20th Anniversary
    2. Support

    3. Suggestions

[SA|CLEO] Cruise Control: Reloaded


Silent

Recommended Posts

Cruise Control: Reloaded 1.0

 

 

What's 'Reloaded'?

 

Reloaded is a series of modifications I'm going to write, which are basically remakes of my old mods, written back in 2008 or 2009. These mostly were bad and weren't working great. Now, my coding skills allow me to write them from scratch, this time working better and faster. All the mods are going to be Open Source, including both new style and old style sources, so you can compare them both and learn how the same (or similar) script can be written in several ways. Please note that it's NOT recommended to EVER use any of the old sources for any reason except than learning (by seeing bad habits)!

 

The first Reloaded mod I'm going to show you is Cruise Control (previously called Tempomat). It might not sound exciting or complex and indeed, this time it's a very simple mod (Silent's aging, eh? tounge.gif). The idea itself might have been made by several modders already, but this release is supposed to be the most natural Cruise Control available. It works differently from the other available mods, so the car's still obeying all the physics laws, and the steering works like the mod's operating your joypad manually (which it does indeed!).

 

 

This mod is compatible with the CLEO 3/4 Libraries found here:

http://cleo.sannybuilder.com/

 

Put CLEO folder (with all their content) in your game directory (not much of a content though!).

 

 

Download

 

As GTAGarage widget is gone for now:

http://www.gtagarage.com/mods/show.php?id=22133

 

 

Usage

 

Press the = button whilst driving to activate Cruise Control. You will hear a single beep indicating that mod is active and waiting you to release throttle. After doing so, you will hear a second beep and vehicle's speed will be kept steady. Accelerate or brake to deactivate Cruise Control.

 

 

Known bugs

 

None.

 

 

That's gonna be the simplest CLEO ever released by me here tounge2.gif

Edited by SilentPL
  • Like 5
Link to post
Share on other sites

 

Going to see nooby mods made in a complex way tounge.gif

This, but also with a lot better functionality! smile.gif

 

Will test this right away.

 

EDIT: God damn it, you've done it again! Thanks really much! smile.gif

 

Btw, got one suggestion for this mod: If you could add decrease/increase option?

Edited by oksa8
Link to post
Share on other sites

 

Btw, got one suggestion for this mod: If you could add decrease/increase option?

Thought about it, had no idea which keypress to use tounge.gif

Link to post
Share on other sites
Btw, got one suggestion for this mod: If you could add decrease/increase option?

Thought about it, had no idea which keypress to use tounge.gif

Maybe +/-? smile.gif

 

Though I guess a way to customize keypresses (other than compiling own script) would be good. Especially for people who aren't using "stantard" keyboard-overlay.

Link to post
Share on other sites

 

Though I guess a way to customize keypresses (other than compiling own script) would be good. Especially for people who aren't using "stantard" keyboard-overlay.

That's going to decrease compatibility with EXEs other than 1.0 (NOT going to make it CLEO4 only), but should be possible.

Link to post
Share on other sites

This is cool man, looking forward to more of your stuff biggrin.gif

 

On the question of keypresses, could you not use the SCM opcode

 

00E1:   player 0 pressed_key 19 

 

using 14 (reverse) or 16 (accelerate) for increasing and decreasing the speed? As these are the ones that relate to customizable controls...

Link to post
Share on other sites

Well, both are used to toggle Cruise Control off (just like in the real autocruise, when you press brake it shuts down instantly).

Link to post
Share on other sites

I guess that's true enough, what about the positive/negative conversation response buttons, 10 and 11 (respectively)?

I'm just thinking about the prospects of people having custom controls, that's all, it'd be cool though :]

Link to post
Share on other sites

Indeed, Y/N (or DPad Up/DPad Down) seems like the best keypresses to implement this. Guess I'll add it soon.

Link to post
Share on other sites
  • 2 weeks later...

I got a small suggestion, maybe for additional version.

 

When you press brake, the mod would temporarily stop working and when brake is released, it would accelerate back to set speed. Or when pressing brake, the cruise-control speed would set to 0 until acceleration-key is pressed. Would help a lot when driving in a city, when you don't need to set the speed all the time in a small alley where you could just let the car glide.

Link to post
Share on other sites

That could work, although it indeed should be an additional version - real life cruise control shutdowns after pressing brake pedal, safety reason.

Link to post
Share on other sites

Thought I'd bump it with some news:

 

I'm planning to release 1.1 version which will cover all the requests in its INI file. That's how it might look:

 

 

[CruiseControl]; Set to 1 to make Cruise Control shutdown permanently after pressing Accelerate key; Setting to 0 will make it shutdown temporaily and go back to esired speed when key is releasedDisableOnAccelerate=0; The same as above, but with Brake keyDisableOnBrake=1; Toggle on/off key; Virtual Key Code, see virtualkeys.txt for referenceToggleKey=11; Increase Speed key; Virtual Key Code, see virtualkeys.txt for referenceIncreaseSpeedKey=12; Decrease Speed key; Virtual Key Code, see virtualkeys.txt for referenceDecreaseSpeedKey=13

 

 

I also thought about a little API (one SCM function), which could allow implementing a new arrow for speedometers which will indicate the speed Cruise Control is aiming at (18 Wheels of Steel anyone?). I'm thinking about shipping an example speedometer (most likely, the one made by Alexander Blade) with this feature applied.

Link to post
Share on other sites

Thats awesome ! ^ v1.1 is going to be great icon14.gif

 

Can I make a suggestion?

 

It's not really 'cruise control' as such; but more of a way to cruise with the traffic ..

 

Possible to set a speed limit (that similar to the speed of the NPC's drive in town); so we can't go over this speed limit with disabling it. That way we can drive around town like a normal person, instead of normal-crazy-GTA-style.

 

Also, is it possible to somehow 'decrease acceleration' .. Its easy to control acceleration when using a XBOX360 control (by using the triggers underneath) .. But with a keyboard, as soon as I put my finger on the 'W' key, its 'full acceleration'; theres no inbetween (except if I tap, but that isn't realistic)

 

I hope thats easy to understand ^

 

EDIT

 

Disregard that last bit, will probably be to hard to implement. I guess the easiest way to achieve it would be to use my 360 controller when I want to drive around town like a normal person. I just left it there incase anyone else had any input/thoughts into the idea.

Link to post
Share on other sites

Both are possible to implement (not 100% sure about the 1st one though). Perhaps I could add "Gentle movments" button, which would 'slow down' the WSAD inputs when pressed (say, press Shift + W to accelerate slowly).

Link to post
Share on other sites
Perhaps I could add "Gentle movments" button, which would 'slow down' the WSAD inputs when pressed (say, press Shift + W to accelerate slowly).

Perfect ! inlove.gif

Sorry we haven't caught up on Skype in a while; different Timezones lol. My PC is always on, so i'm always on Skype, even though I'm not around

Link to post
Share on other sites
  • 2 months later...

Unfortunately not, many other things were stealing my time tounge.gif

Link to post
Share on other sites
  • 9 months later...

Where is download link???

GTAGarage widget is gone since the update, so there was no link in the main post indeed. Get it here:

http://www.gtagarage.com/mods/show.php?id=22133

Link to post
Share on other sites
  • 2 months later...
  • 6 months later...

Usage

 

Press the = button whilst driving to activate Cruise Control. You will hear a single beep indicating that mod is active and waiting you to release throttle. After doing so, you will hear a second beep and vehicle's speed will be kept steady. Accelerate or brake to deactivate Cruise Control.

 

 

 

 

Well I have a couple of Cleo mods installed. I tried your cruise control cause it sounded what I need. Unfortunately the = or 0 key does nothing when pressed ingame.

Could it be that your *cs file is sensitive or interferes with others in the Cleo folder?

Edited by step2ice
Link to post
Share on other sites

 

Usage

 

Press the = button whilst driving to activate Cruise Control. You will hear a single beep indicating that mod is active and waiting you to release throttle. After doing so, you will hear a second beep and vehicle's speed will be kept steady. Accelerate or brake to deactivate Cruise Control.

 

 

 

 

Well I have a couple of Cleo mods installed. I tried your cruise control cause it sounded what I need. Unfortunately the = or 0 key does nothing when pressed ingame.

 

Could it be that your *cs file is sensitive or interferes with others in the Cleo folder?

 

First of all, congrats for the bump :)

Second, try it without any other mods, see what happens and make sure you install it correctly.

Link to post
Share on other sites
  • 1 year later...

Hi Silent. First, this is a great idea. But "0" key or "Shift" + "0" for "Equals" isn't working for me. Can we set a different key for this?

Edited by TurnCoatModder
Link to post
Share on other sites
  • 4 weeks later...

Thought I'd bump it with some news:

 

I'm planning to release 1.1 version which will cover all the requests in its INI file. That's how it might look:

 

 

CODE [CruiseControl]

; Set to 1 to make Cruise Control shutdown permanently after pressing Accelerate key

; Setting to 0 will make it shutdown temporaily and go back to esired speed when key is released

DisableOnAccelerate=0

; The same as above, but with Brake key

DisableOnBrake=1

; Toggle on/off key; Virtual Key Code, see virtualkeys.txt for reference

ToggleKey=11

; Increase Speed key; Virtual Key Code, see virtualkeys.txt for reference

IncreaseSpeedKey=12

; Decrease Speed key; Virtual Key Code, see virtualkeys.txt for reference

DecreaseSpeedKey=13

 

 

I also thought about a little API (one SCM function), which could allow implementing a new arrow for speedometers which will indicate the speed Cruise Control is aiming at (18 Wheels of Steel anyone?). I'm thinking about shipping an example speedometer (most likely, the one made by Alexander Blade) with this feature applied.

 

 

I don't find the download for v1.1.. :D

Link to post
Share on other sites
  • 9 months later...
  • 2 years later...
  • 4 months later...

not working, cleo loads it correctly and sees it but as soon as i hit = the games shows garbage on the chat and crashes let me know how to fix otherwise your script will just be useless not working crap, and i will keep the 1 star rating

Edited by fiat682
grammar correction
Link to post
Share on other sites
11 hours ago, fiat682 said:

otherwise your script will just be useless not working crap, and i will keep the 1 star rating

 

oh no, the horror

 

But on a serious note, I have not checked this script for a long long while  (it's really been 7 years),  but I really don't see how it'd crash. You also seem to use SA-MP and I have not checked this mod against compatibility with it - and SA-MP has a very long history of breaking mods for no reason, so in majority of cases mods are not even at fault here.

Link to post
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.