DarkRP - Buyable Cars to F4 Menu

I have searched the forums on how to do this, but all that I found was either unclear, or questions were still left unanswered.

How can I add buyable Sickness (or any other cars) to the F4 menu, so that everyone can buy them? Like a money printer, all jobs can get them. I have looked through the lua of DarkRP but most of it is unclear, or has these confusing references that I dont know about. I can re-type simple scripts e.g. existing jobs into new jobs, but other than that I really suck at lua. I have Notepad++ aswell (dunno if that helps)

Also if anyone knows a way to make people keep their cars after they disconnect would be really appreciated too

Many Thanks,

Well for vehicles here is a line from the addentities.lua you should read.

addentities.lua is the main place fro entities/weapons/vehicles/shipments

AddCustomVehicle(“Airboat”, “models/airboat.mdl” ,600, {TEAM_GUN})
AddCustomVehicle(“Name on Dark RP”, “the model name”, price, {TEAM_WHATEVER, TEAM_WHATEVER2})

As for saving cars, learn some MySQl and make it so it saves that persons possessions to a database and when he spawns then add them to his store.

Thank you :slight_smile:

EDIT: there isnt an addentities.lua, instead there is addshipments.lua

Please use the newest svn version

Taken directly from the addshipments.lua file (DarkRP 2.3.5) [Line 65] :

[lua]-- How to add custom vehicles:
– go ingame, type rp_getvehicles for available vehicles!
– then:
– AddCustomVehicle(<One of the vehicles from the rp_getvehicles list>,
– <Price of the vehicle>, <OPTIONAL jobs that can buy the vehicle>)
– Examples:
– AddCustomVehicle(“Jeep”, 100) – Not typing a TEAM will make it available for all teams.
– AddCustomVehicle(“Airboat”, 600, {TEAM_GUN}) – Specific TEAM only
– AddCustomVehicle(“Airboat”, 600, {TEAM_GUN, TEAM_MEDIC}) – Specific TEAMS only[/lua]

For saving cars - (SQL Tutorial)

Thanks guys, Its working fine now.

Thanks again :slight_smile:

Got the new SVN version…
Its great! It fixed almost all the bugs I had before! :smiley: