[Release]DUFX - Mechanic and Car Script

Dufx started life as just a simple repair spot for Tow Truck drivers to drop people off to fix there cars

I have added other things I want in my own server but made it configurable so it can be edited without a problem.

This mod is very early days but at the moment it offers

  • Free fixing
  • Paid option via EssentialMode - Must Enable in fx file and config
  • Config enable and disable options so no needed to reload server.cfg just disable or enable in the config and restart dufx via F8
  • No Police car fixing toggle, this helps RP servers that don’t want normal users stealing or fixing damaged police cars
  • Dialog Mod, By default dialogs are enabled to make it more realistic and slower, but Dialog can be disabled in the config
  • Random prices, min and max prices can be set in config
  • Basic PVP support This was added for our own server as we trying to cut down the need of smaller mods
  • Usefule Commands /SavePlace (Will save your place in USERNAMEPlace.txt) /FoxVersion this will show you the version of the script your running this is hidden to all users part from the user set in the config file as ServerOwner.
  • (1.0.0.6) Engine Toggle Engine options to enable and disable the engine via command /carkey or keybind num - both can be changed in the config, these options are off by default so they don’t conflict with other mods, hold F to get out of the car leaving the engine on.
  • Exports starting from 1.0.0.6 some funtions will be exported so you can use in your own scripts

Post last updated 2020-05-24T23:00:00Z

DialogMod Enabled by default
When the tow truck drops you off or you drive in to the “Fox’s Fix”'s spots you are grated with dialog, it starts to fix your car, your hood will open at some point in the dialog, once the dialog says all fixed you see your car restarts and your free to drive away.

License (WTFPL) View Here

Downloads:
0.0.1.3
dufx-0-0-1-3.zip (5.4 KB)
0.0.1.4 (Here)
dufx-0-0-1-4.zip (6.0 KB)
0.0.1.5 (Here)
dufx-0-0-1-5.zip (6.1 KB)
0.0.1.6
dufx-0-0-1-6.zip (5.2 KB)
0.0.1.7 (Here)
dufx-0-0-1-7.zip (83.5 KB)
_0.0.2.0 (Here)
dufx-0.0.2.0.zip (533.2 KB)
1.0.0.4(Here)
dufx.zip 1.0.0.4 (271.6 KB)
1.0.0.5 (Here) - Fuel Me Update
dufx 1.0.0.5.zip
1.0.0.6(Soon) - More Grease Update
Coming soon.

9 Likes

Is there a download link?

Woops thanks guys I will fix this now lol silly me

I have edited the Opening post, it now has the download link, sorry guys I over looked that for sure :slight_smile:

1 Like

[Known Problems]
Fuel option is still within the script, I am still unable to get that to work no matter what I tried, I am still going to work on it so I didn’t see the need to remove it at the moment, its there more so for a place holder.

[Future]
Language Support, going to enable a Language file where users can add there own Language Tables
If I am able to more government disabled support at the moment it’s just police.
Future Fix Fuel problem.
Fix burnt out vehicles
Mysql and coutch Optional Support

I am open to ideas, will listen to bugs and will try make it compatible with other mods, I am not new to lua but I am new to it been used like this so understanding it is making my head hurt lol but I am dyslexic so I will blame that as a factor also, so bear with me at times :slight_smile:

A nice idea would be a police only option that doesn’t charge. Basically, you can have points where civs can fix cars and be charged that doesn’t allow police car repairs and then a second set (placed at police stations) that allow for police cars to be repaired for free that civilian cars can’t use.

This way, police that have accidents must get towed to their station to get repaired. At the same time, civs can’t use them to get free repairs.

Just an idea.

Either way, fantastic release. Keep it up.

1 Like

That is def on the the future pile, I don’t know anything how to do police and civ’s yet I didn’ even know to while list myself to be a police on my own server lol, all new concept :slight_smile: but I do love that idea I already have two none used points in the police garages you see them commented out in the config file.

But I will put this on the idea list as it’s a good one and it would also mean server admins don’t need to give the /fix or /repair or what ever command going at the time to users that are police but not staff.

By the way, what is the seed number used for?

I use the Lua Random function and I use that random number + game time to create a Seed for the random function so it is better then just the normal random as it can repeat a lot, so if you change that number to another big number like it is then you get a hole new set of random based numbers.

So it just helps reseed the randomise a little, I just added it there just in case people saw a pattern so they could change it a little

1 Like

Sorry to keep with the questions, but I’m sure someone will ask anyway. The game name, is it the fivem game name or the steam profile name? Can it have spaces?

I am no fan of the steamID bull so this is your normal game name, I do hope in the future I can create a proxy for plugins that are using a steam ID, so we can still play with mods made for steam ID only but until I get my head around this it’s only in game Name, I will add a little update to the read me on the next version

You are very right and welcome to ask everything because someone might want to know at some point so keep them shooting at us, the new version will be out a little later today I think, the new version only change is a dialog.lua file so users can create the own language table.

So I will add the information about ServerOwner name to be In Game Name not ID.

Unless you asking about the GarageName then that is what ever you want to set it, it’s just a in game name for the garages :slight_smile:

It would be great if the dialog was set up as an array so the message isn’t always the same. Getting ready to test this puppy right now. Again, from the video I seen, great work.

1 Like

That could be a option but you have to think more loops and other things like this will lag scripts down and other scripts down, so I could maybe add another random selection maybe but I going to test the waters first with all the basic functions before adding that kind of eye kindy :slight_smile:

Also thanks for all the comments and support so far.

Ok, another thing LOL

I moved

SetVehicleFixed(vehid);

To just above

DisplayBottomLeft("~bh~"…FoxFix.GarageName…"~hs~: All fixed.");

So the repair doesn’t happen until the end. Simply because some people are dumb. They’ll see the car get fixed in the beginning and just take off. Suddenly the hood will pop open and fly off and they’ll complain.

1 Like

No that will brake the wait option, the repair also was put there for a reason so we don’t have to replace the hood in command to have it open, the repair was also up there as you can disable the dialog function full stop.

Also that is why the car is set to off and undrivable until the dialog is done, this way they can’t just drive off, I already already tested that part, and it was the best way of doing it without addming more function calls.

What I mean is if they brake there hood we would have to replace the hood in code first, what I don’t really want to do lol Moving it to the other side of the if statement of the dialogs would work but would create a few problems with the hood command, it was just away to get around things like that I guess it don’t really matter but I don’t like calling functions what do nothing to waste resources lol

My car never shut off. I was able to drive away as soon as the dialog started. :thinking:

That’s strange what other mods do you have installed with it, it turns off for me

I have done some changes anyway give me 10 mins to test and I will post 0.0.4.0

vmenu, but I don’t use the keep vehicle running option because it’s annoying and realistic vehicle failure

I have VMenu 1.1.2 I know there is now 1.1.3 but I sure that wont be the problem but I will send you the new version soon and you can test that, if there is any problems still I will update Vmenu see if we have a problem there.

I will also try it with that mod also soon as I release the update.