Allen Kaganovsky
Member
HELLO! I didn't make a post in a while, thought I would share a script I wrote a few weeks ago.
I originally created this for an Altis Life server, having speed limits and 25km one way trips made something like this essential. But I don't see why this can't work on any dayz server - even arma 2 (May need some adjustments in the hints formatting, since the hint box is not as wide in arma 2 as it is in arma 3).
How it works:
There are 4 preset cruising speeds: 50, 70, 120, 160 km/h <you'll need to understand the code and change it yourself if you like>
The vehicle must already be moving +/-5 km/h from the cruising speed so that the jump in velocity isn't that noticeable. From the mouse scroll menu, simply select Cruise Control.
If the vehicle is not within any speed range then a hint message comes up to display the possible cruising speeds.
If the vehicle is within a cruising speed range, then a loop activates that constantly gets the vehicle direction and sets its appropriate velocity. It also checks for vehicle fuel and damaged vehicles.
There is also a key listener that deactivates the cruising speed when the breaks (S) are applied.
Script Download:
https://github.com/allen-k/Arma3CruiseControl/blob/master/mod_cruiseControl.sqf
Script Install:
This is meant to go server side, so put the file server side.. I'll use the example from altis life, you'll need to figure out the proper path based on the mod your using this script on.
1. Create a folder called "mods" in the root directory of life_server folder.
2. Place the mod_cruiseControl.sqf file into the mods folder
3. In the servers init.sqf file, you'll want to add this line at the end of the file:
// cruise control
[] execVM "\life_server\mods\mod_cruiseControl.sqf";
4. In the Mission side of things, edit the init.sqf, at the end of the file add:
// mod cruise control
call mod_cruiseControl;
Lastly:
enjoy!
Also let me know if any of you try it out in Arma 2, and if the hints need to be adjusted due to text size.
EDIT!!!!! FOR ARMA 2 YOU NEED TO CHANGE THE FONT FOR THE HINTS!
change all instances of puristaLight and puristaMedium to Bitstream
I originally created this for an Altis Life server, having speed limits and 25km one way trips made something like this essential. But I don't see why this can't work on any dayz server - even arma 2 (May need some adjustments in the hints formatting, since the hint box is not as wide in arma 2 as it is in arma 3).
How it works:
There are 4 preset cruising speeds: 50, 70, 120, 160 km/h <you'll need to understand the code and change it yourself if you like>
The vehicle must already be moving +/-5 km/h from the cruising speed so that the jump in velocity isn't that noticeable. From the mouse scroll menu, simply select Cruise Control.
If the vehicle is not within any speed range then a hint message comes up to display the possible cruising speeds.
If the vehicle is within a cruising speed range, then a loop activates that constantly gets the vehicle direction and sets its appropriate velocity. It also checks for vehicle fuel and damaged vehicles.
There is also a key listener that deactivates the cruising speed when the breaks (S) are applied.

Script Download:
https://github.com/allen-k/Arma3CruiseControl/blob/master/mod_cruiseControl.sqf
Script Install:
This is meant to go server side, so put the file server side.. I'll use the example from altis life, you'll need to figure out the proper path based on the mod your using this script on.
1. Create a folder called "mods" in the root directory of life_server folder.
2. Place the mod_cruiseControl.sqf file into the mods folder
3. In the servers init.sqf file, you'll want to add this line at the end of the file:
// cruise control
[] execVM "\life_server\mods\mod_cruiseControl.sqf";
4. In the Mission side of things, edit the init.sqf, at the end of the file add:
// mod cruise control
call mod_cruiseControl;
Lastly:
enjoy!
Also let me know if any of you try it out in Arma 2, and if the hints need to be adjusted due to text size.
EDIT!!!!! FOR ARMA 2 YOU NEED TO CHANGE THE FONT FOR THE HINTS!
change all instances of puristaLight and puristaMedium to Bitstream