[b]Jax's Car Mod[/b]
[b]*Features*[/b]
-Speedometer
-Fuel Gauge
-Gas Can Entity
-Radar Gun
-Admin Gun
[b]*How to add vehicles*[/b]
-while in-game, open the spawn/tool menu and go to options>Jax's Car Mod>Admin and select "Manage Vehicles"
-click on the button labeled "Add Vehicle" and input the model and Fuel where indicated
-you can edit vehicles using the "Manage Vehicle" button
[b]*OR*[/b]
-navigate to addons/Jax's Car Mod/lua/CarMod-Jax/shared.lua
-use the format AddCar( "model", Max/Starting Fuel ) (this is included in the file with an example) (this method is deprecated, but still available)
*Tip* - while using the admin gun, right click while looking at a vehicle to copy the model
[b]*Admin Gun*[/b]
-left click to refill fuel of car you are looking at
-right click to put the model of a vehicle you are looking at onto your clipboard
[b]*Radar Gun*[/b]
-left click to retrieve speed and driver of vehicle (placed in user's chat)
[b]*Gas Can Entity*[/b]
-On contact with vehicle, adds fuel and dissappears
-doesn't do anything if fuel gauge is full
-amount of fuel it adds can be edited in the admin options
[b]*Added Functions*[/b]
Vehicle:CheckGasSet() - returns bool, Checks to see if the vehicle in question is added/set up with mod
Vehicle:GetMaxGas() - returns the Max/Starting Fuel of a vehicle
Vehicle:GiveFuel( amount ) - *server-side only* adds specified amount to a vehicle's fuel (will not exceed Max/Starting Fuel or fall below 0)
Vehicle:SetFuel( amount ) - *server-side only* sets the fuel on a vehicle to a specified amount (will not exceed Max/Starting Fuel or fall below 0)
Vehicle:GetFuel() - returns amount of fuel left in vehicle
Vehicle:GetSpeed() - returns vehicle's current speed
GetMaxGas( mdl ) - returns same as vehicle:GetMaxGas() (Max/starting fuel of a model)
CheckGasSet( mdl ) - returns same as vehicle:CheckGasSet() (checks whether or not the vehicle is added/set up with mod)
[b]*Videos*[/b]
First Look -
[video=youtube;uTYXJgZGz3U]http://www.youtube.com/watch?v=uTYXJgZGz3U[/video]
Admin Vehicle Manager GUI -
[video=youtube;TNgitA0Zg2o]http://www.youtube.com/watch?v=TNgitA0Zg2o[/video]
[b]*Changelog*[/b]
v1.3
*Fixed a few bugs that occurred when running DarkRP
v1.2
*fixed vehicle not turning on and saying out of gas when gas is set via Car Manager
*adjusted speed values to be more realistic
*fixed gas can entity from treating all cars as having max 1000 fuel
+added ability to change gas amount administered by gas can entity in admin options
+added help menu
v1.1
+Added Vehicle Manager GUI
*Lowered and shortened 2D HUD
*adding cars by shared.lua deprecated
+added 2 more functions
v1.0
Release :D
[b][url=https://www.dropbox.com/s/spfqxgp9sji4b68/Jax%27s%20Car%20Mod%20v1.3.rar]Download (via Dropbox)[/url][/b]
[b][url=http://steamcommunity.com/sharedfiles/filedetails/?id=288145875]Download (via Workshop)[/url][/b]
[b][url=https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9PETW7DHAH9UY]Donate, if you'd like :)[/url][/b]
please leave bugs/questions/suggestions below
put dis shit on the workshop, yo
lol, That's like 1 mile per gallon.
[QUOTE=kpjVideo;45434142]lol, That's like 1 mile per gallon.[/QUOTE]
My cousin used to have a range rover, I know from experience that that is way more than 1 mile per gallon ;)
and you can edit how much fuel it takes, I used 1000 as a base starting point and so i can test certaij functions when it runs out of fuel quicker, it's intended to have a much higher fuel amount haha
i have 2 suggestions:
1) For draw the card on third person use PreDrawTranslucentRenderables, looks like card draws after the car
2) Move the main fuel bar to the botton and make the height lesser
[QUOTE=gonzalolog;45434328]i have 2 suggestions:
1) For draw the card on third person use PreDrawTranslucentRenderables, looks like card draws after the car
2) Move the main fuel bar to the botton and make the height lesser[/QUOTE]
what do you mean by card?
[QUOTE=Galen;45433578]put dis shit on the workshop, yo[/QUOTE]
it's up, link in the OP
uploaded version 1.1 to both dropbox and workshop, changelog in the OP :)
pushed another update onto the workshop, dropbox link will be up soon, changelog in op will also be updated. I'm probably going to stop posting updates in here after this as no one reads the thread lol.
it's a nice thing but you should save the fuel of the cars and make the vgui a bit nicer only my thoughts
[QUOTE=frietje2008;45465134]it's a nice thing but you should save the fuel of the cars and make the vgui a bit nicer only my thoughts[/QUOTE]
save the fuel of the cars? what do you mean?
[QUOTE=jack10685;45465247]save the fuel of the cars? what do you mean?[/QUOTE]
Person purchases a car
Person uses fuel
Person rejoins server and uses their car again
Person has same fuel level as before (not back to full).
I think that's what he means.
[QUOTE=GmodLUA;45465305]Person purchases a car
Person uses fuel
Person rejoins server and uses their car again
Person has same fuel level as before (not back to full).
I think that's what he means.[/QUOTE]
ahhh, well the mod doesn't include purchasing, as I spawn only from the spawnmenu, but I guess I can do something in the spawn function for setting an owner (and set it to incorporate that in say, a darkrp spawn menu or an npc dealer)
Would be nice - good work for a free script! Keep it up!
[QUOTE=GmodLUA;45465540]Would be nice - good work for a free script! Keep it up![/QUOTE]
thanks mate, glad you like it :)
[editline]d[/editline]
I don't think i am going to be able to do your fuel saving bit :(, I tried implementing it and it seems to fuck up everything else for some unknown reason. I'v spent the past 20 - 30 minutes trying to fix everything it breaks but every time I fix one thing another error shows up with no reason for one to show. If some coding guru would like to help, be my guest and add me on [url=http://steamcommunity.com/id/jackskellington20]steam[/url] lol.
Your UI is not the best. I mean it's awful. Hire someone, call a friend or remake it by yourself and it will become great addon.
[QUOTE=AirBlack;45470504]Your UI is not the best. I mean it's awful. Hire someone, call a friend or remake it by yourself and it will become great addon.[/QUOTE]
added to the list of things to do
For some reason whenever I add this to a server, DarkRP, it kills the server. The data doesn't load, as in no wallets, no player models, sometimes no jobs. I can't seem to figure out why, I just plopped the addon in, didn't edit anything and it doesn't work. Any ideas?
[QUOTE=Chimpanzee;45490489]For some reason whenever I add this to a server, DarkRP, it kills the server. The data doesn't load, as in no wallets, no player models, sometimes no jobs. I can't seem to figure out why, I just plopped the addon in, didn't edit anything and it doesn't work. Any ideas?[/QUOTE]
works for me, are you using any other addons?
[QUOTE=jack10685;45491298]works for me, are you using any other addons?[/QUOTE]
Yes, but nothing that should be conflicting with this, I'll try messing around with adding it to only some addons and I'll get back to this thread.
[QUOTE=Chimpanzee;45490489]For some reason whenever I add this to a server, DarkRP, it kills the server. The data doesn't load, as in no wallets, no player models, sometimes no jobs. I can't seem to figure out why, I just plopped the addon in, didn't edit anything and it doesn't work. Any ideas?[/QUOTE]
Same for me, not running darkrp. But my cash didnt load, jobs didnt load. Received this error.
[lua][ERROR] lua/includes/modules/net.lua:92: bad argument #1 to 'pairs' (table expected, got nil)
1. pairs - [C]:-1
2. WriteTable - lua/includes/modules/net.lua:92
3. fn - addons/jax's car mod v1.2/lua/carmod-jax/shared.lua:25
4. unknown - addons/ulib/lua/ulib/shared/hook.lua:183
[/lua]
[QUOTE=ds;45501757]Same for me, not running darkrp. But my cash didnt load, jobs didnt load. Received this error.
[lua][ERROR] lua/includes/modules/net.lua:92: bad argument #1 to 'pairs' (table expected, got nil)
1. pairs - [C]:-1
2. WriteTable - lua/includes/modules/net.lua:92
3. fn - addons/jax's car mod v1.2/lua/carmod-jax/shared.lua:25
4. unknown - addons/ulib/lua/ulib/shared/hook.lua:183
[/lua][/QUOTE]
ok, I'll look into it
[editline]f[/editline]
I can't replicate the error, but I did add a function to the line that seems to be having an error to prevent the error, I'll add it to the next release
Updated the workshop addon, changes will be put in the OPs changelog, I'll update the dropbox link soon as well
Sorry, you need to Log In to post a reply to this thread.