[Release] [ES] es_garages | Vehicle Ownership & Garages

Is there any plans too…
Only be able to retrieve one of each vehicle,
Able to return vehicle into the garage/shop,
A new category for owned vehicles,
And finally, able to save modifications. (if returned into storage)

Thanks

That is not a problem, that’s a feature!!! LOL J/K

Hi do you know other garage location address ? :slight_smile:

solved;) it works , thx

Added some cars that were missing plus added cycles and motorcycles. Same as before the menu needs work so if anyone is able to do that, it would be appreciated.

client.lua - https://pastebin.com/Y0kmzevw

server.lua - https://pastebin.com/VRxhQcg2

I am trying to take the menu from the vehicle script that comes with fs_freeroam and put it into this script but it is proving to be very difficult. If anyone that is better than me can do this then please do so!

1 Like

I said screw it to that idea and just compromised this is a list of cars in the correct format that will not go off the page

local menu = {
	{
			name = "compacts",
			vehicles = {
				{name = "Blista", price = 15000, model = "blista"},
				{name = "Brioso R/A", price = 155000, model = "brioso"},
				{name = "Dilettante", price = 25000, model = "Dilettante"},
				{name = "Issi", price = 18000, model = "issi2"},
				{name = "Panto", price = 85000, model = "panto"},
				{name = "Prairie", price = 30000, model = "prairie"},
				{name = "Rhapsody", price = 120000, model = "rhapsody"},
			}
		},
		{
			name = "coupes",
			vehicles = {
				{name = "Cognoscenti Cabrio", price = 180000, model = "cogcabrio"},
				{name = "Exemplar", price = 200000, model = "exemplar"},
				{name = "F620", price = 80000, model = "f620"},
				{name = "Felon", price = 90000, model = "felon"},
				{name = "Felon GT", price = 95000, model = "felon2"},
				{name = "Jackal", price = 60000, model = "jackal"},
				{name = "Oracle", price = 80000, model = "oracle"},
				{name = "Oracle XS", price = 82000, model = "oracle2"},
				{name = "Sentinel", price = 90000, model = "sentinel"},
				{name = "Sentinel XS", price = 60000, model = "sentinel2"},
				{name = "Windsor", price = 800000, model = "windsor"},
				{name = "Windsor Drop", price = 850000, model = "windsor2"},
				{name = "Zion", price = 60000, model = "zion"},
				{name = "Zion Cabrio", price = 65000, model = "zion2"},
			}
		},
		{
			name = "sports",
			vehicles = {
				{name = "9F", price = 120000, model = "ninef"},
				{name = "9F Cabrio", price = 130000, model = "ninef2"},
				{name = "Alpha", price = 150000, model = "alpha"},
				{name = "Banshee", price = 105000, model = "banshee"},
				{name = "Bestia GTS", price = 610000, model = "bestiagts"},
				{name = "Blista Compact", price = 42000, model = "blista"},
				{name = "Buffalo", price = 35000, model = "buffalo"},
				{name = "Buffalo S", price = 96000, model = "buffalo2"},
				{name = "Carbonizzare", price = 195000, model = "carbonizzare"},
				{name = "Comet", price = 100000, model = "comet2"},
				{name = "Coquette", price = 138000, model = "coquette"},
				{name = "Drift Tampa", price = 995000, model = "tampa2"},
				{name = "Feltzer", price = 130000, model = "feltzer2"},
				{name = "Furore GT", price = 448000, model = "furoregt"},
				{name = "Fusilade", price = 36000, model = "fusilade"},
			}
		},
		{
			name = "sports 2",
			vehicles = {
				{name = "Jester", price = 240000, model = "jester"},
				{name = "Jester(Racecar)", price = 350000, model = "jester2"},
				{name = "Kuruma", price = 95000, model = "kuruma"},
				{name = "Lynx", price = 1735000, model = "lynx"},
				{name = "Massacro", price = 275000, model = "massacro"},
				{name = "Massacro(Racecar)", price = 385000, model = "massacro2"},
				{name = "Omnis", price = 701000, model = "omnis"},
				{name = "Penumbra", price = 24000, model = "penumbra"},
				{name = "Rapid GT", price = 140000, model = "rapidgt"},
				{name = "Rapid GT Convertible", price = 150000, model = "rapidgt2"},
				{name = "Schafter V12", price = 140000, model = "schafter3"},
				{name = "Sultan", price = 12000, model = "sultan"},
				{name = "Surano", price = 110000, model = "surano"},
				{name = "Tropos", price = 816000, model = "tropos"},
				{name = "Verkierer", price = 695000, model = "verlierer2"},
			}
		},
		{
			name = "sportsclassics",
			vehicles = {
				{name = "Casco", price = 680000, model = "casco"},
				{name = "Coquette Classic", price = 665000, model = "coquette2"},
				{name = "JB 700", price = 350000, model = "jb700"},
				{name = "Pigalle", price = 400000, model = "pigalle"},
				{name = "Stinger", price = 850000, model = "stinger"},
				{name = "Stinger GT", price = 875000, model = "stingergt"},
				{name = "Stirling GT", price = 975000, model = "feltzer3"},
				{name = "Z-Type", price = 950000, model = "ztype"},
			}
		},
		{
			name = "super",
			vehicles = {
				{name = "Adder", price = 1000000, model = "adder"},
				{name = "Banshee 900R", price = 565000, model = "banshee2"},
				{name = "Bullet", price = 155000, model = "bullet"},
				{name = "Cheetah", price = 650000, model = "cheetah"},
				{name = "Entity XF", price = 795000, model = "entityxf"},
				{name = "ETR1", price = 199500, model = "sheava"},
				{name = "FMJ", price = 1750000, model = "fmj"},
				{name = "Infernus", price = 440000, model = "infernus"},
				{name = "Osiris", price = 1950000, model = "osiris"},
				{name = "RE-7B", price = 2475000, model = "le7b"},
			}
		},
		{
			name = "super 2",
			vehicles = {
				{name = "Reaper", price = 1595000, model = "reaper"},
				{name = "Sultan RS", price = 795000, model = "sultanrs"},
				{name = "T20", price = 2200000, model = "t20"},
				{name = "Turismo R", price = 500000, model = "turismor"},
				{name = "Tyrus", price = 2550000, model = "tyrus"},
				{name = "Vacca", price = 240000, model = "vacca"},
				{name = "Voltic", price = 150000, model = "voltic"},
				{name = "X80 Proto", price = 2700000, model = "prototipo"},
				{name = "Zentorno", price = 725000, model = "zentorno"},
			}
		},
		{
			name = "muscle",
			vehicles = {
				{name = "Blade", price = 160000, model = "blade"},
				{name = "Buccaneer", price = 29000, model = "buccaneer"},
				{name = "Chino", price = 225000, model = "chino"},
				{name = "Coquette BlackFin", price = 695000, model = "coquette3"},
				{name = "Dominator", price = 35000, model = "dominator"},
				{name = "Dukes", price = 62000, model = "dukes"},
				{name = "Gauntlet", price = 32000, model = "gauntlet"},
				{name = "Hotknife", price = 90000, model = "hotknife"},
				{name = "Faction", price = 36000, model = "faction"},
				{name = "Nightshade", price = 585000, model = "nightshade"},
				{name = "Picador", price = 9000, model = "picador"},
				{name = "Sabre Turbo", price = 15000, model = "sabregt"},
				{name = "Tampa", price = 375000, model = "tampa"},
				{name = "Virgo", price = 195000, model = "virgo"},
				{name = "Vigero", price = 21000, model = "vigero"},
			}
		},
		{
			name = "off-road",
			vehicles = {
				{name = "Bifta", price = 75000, model = "bifta"},
				{name = "Blazer", price = 8000, model = "blazer"},
				{name = "Brawler", price = 715000, model = "brawler"},
				{name = "Bubsta 6x6", price = 249000, model = "dubsta3"},
				{name = "Dune Buggy", price = 20000, model = "dune"},
				{name = "Rebel", price = 22000, model = "rebel2"},
				{name = "Sandking", price = 38000, model = "sandking"},
				{name = "The Liberator", price = 550000, model = "monster"},
				{name = "Trophy Truck", price = 550000, model = "trophytruck"},
			}
		},
		{
			name = "suvs",
			vehicles = {
				{name = "Baller", price = 90000, model = "baller"},
				{name = "Cavalcade", price = 60000, model = "cavalcade"},
				{name = "Grabger", price = 35000, model = "granger"},
				{name = "Huntley S", price = 195000, model = "huntley"},
				{name = "Landstalker", price = 58000, model = "landstalker"},
				{name = "Radius", price = 32000, model = "radi"},
				{name = "Rocoto", price = 85000, model = "rocoto"},
				{name = "Seminole", price = 30000, model = "seminole"},
				{name = "XLS", price = 253000, model = "xls"},
			}
		},
		{
			name = "vans",
			vehicles = {
				{name = "Bison", price = 30000, model = "bison"},
				{name = "Bobcat XL", price = 23000, model = "bobcatxl"},
				{name = "Gang Burrito", price = 65000, model = "gburrito"},
				{name = "Journey", price = 15000, model = "journey"},
				{name = "Minivan", price = 30000, model = "minivan"},
				{name = "Paradise", price = 25000, model = "paradise"},
				{name = "Rumpo", price = 13000, model = "rumpo"},
				{name = "Surfer", price = 11000, model = "surfer"},
				{name = "Youga", price = 16000, model = "youga"},
			}
		},
		{
			name = "sedans",
			vehicles = {
				{name = "Asea", price = 1000000, model = "asea"},
				{name = "Asterope", price = 1000000, model = "asterope"},
				--{name = "Cognoscenti", price = 1000000, model = "cognoscenti"},
				--{name = "Cognoscenti(Armored)", price = 1000000, model = "cognoscenti2"},
				--{name = "Cognoscenti 55", price = 1000000, model = "cognoscenti3"},
				--{name = "Cognoscenti 55(Armored", price = 1500000, model = "ZENTORNO"},
				{name = "Fugitive", price = 24000, model = "fugitive"},
				{name = "Glendale", price = 200000, model = "glendale"},
				{name = "Ingot", price = 9000, model = "ingot"},
				{name = "Intruder", price = 16000, model = "intruder"},
				{name = "Premier", price = 10000, model = "premier"},
				{name = "Primo", price = 9000, model = "primo"},
				{name = "Primo Custom", price = 9500, model = "primo2"},
				{name = "Regina", price = 8000, model = "regina"},
			}
		},
		{
			name = "sedans 2",
			vehicles = {
				{name = "Schafter", price = 65000, model = "schafter2"},
				{name = "Stanier", price = 10000, model = "stanier"},
				{name = "Stratum", price = 10000, model = "stratum"},
				{name = "Stretch", price = 30000, model = "stretch"},
				{name = "Super Diamond", price = 250000, model = "superd"},
				{name = "Surge", price = 38000, model = "surge"},
				{name = "Tailgater", price = 55000, model = "tailgater"},
				{name = "Warrener", price = 120000, model = "warrener"},
				{name = "Washington", price = 15000, model = "washington"},
			}
		},
		{
			name = "motorcycles",
			vehicles = {
				{name = "Akuma", price = 9000, model = "AKUMA"},
				{name = "Bagger", price = 5000, model = "bagger"},
				{name = "Bati 801", price = 15000, model = "bati"},
				{name = "Bati 801RR", price = 15000, model = "bati2"},
				{name = "BF400", price = 95000, model = "bf400"},
				{name = "Carbon RS", price = 40000, model = "carbonrs"},
				{name = "Cliffhanger", price = 225000, model = "cliffhanger"},
				{name = "Daemon", price = 5000, model = "daemon"},
				{name = "Double T", price = 12000, model = "double"},
				{name = "Enduro", price = 48000, model = "enduro"},
				{name = "Faggio", price = 4000, model = "faggio2"},
				{name = "Gargoyle", price = 120000, model = "gargoyle"},
			}
		},
		{
			name = "motorcycles 2",
			vehicles = {
				{name = "Hakuchou", price = 82000, model = "hakuchou"},
				{name = "Hexer", price = 15000, model = "hexer"},
				{name = "Innovation", price = 90000, model = "innovation"},
				{name = "Lectro", price = 700000, model = "lectro"},
				{name = "Nemesis", price = 12000, model = "nemesis"},
				{name = "PCJ-600", price = 9000, model = "pcj"},
				{name = "Ruffian", price = 9000, model = "ruffian"},
				{name = "Sanchez", price = 7000, model = "sanchez"},
				{name = "Sovereign", price = 90000, model = "sovereign"},
				{name = "Thrust", price = 75000, model = "thrust"},
				{name = "Vader", price = 9000, model = "vader"},
				{name = "Vindicator", price = 600000, model = "vindicator"},
			}
		}
}

this is the list of vehicles in server.lua

local vehicles = {
	blista = 15000,
	brioso = 155000,
	Dilettante = 25000,
	issi2 = 18000,
	panto = 85000,
	prairie = 30000,
	rhapsody = 120000,
	cogcabrio = 180000,
	exemplar = 200000,
	f620 = 80000,
	felon = 90000,
	felon2 = 95000,
	jackal = 60000,
	oracle = 80000,
	oracle2 = 82000,
	sentinel = 90000,
	sentinel2 = 60000,
	windsor = 800000,
	windsor2 = 850000,
	zion = 60000,
	zion2 = 65000,
	ninef = 120000,
	ninef2 = 130000,
	alpha = 150000,
	banshee = 105000,
	bestiagts = 610000,
	blista = 42000,
	buffalo = 35000,
	buffalo2 = 96000,
	carbonizzare = 195000,
	comet2 = 100000,
	coquette = 138000,
	tampa2 = 995000,
	feltzer2 = 130000,
	furoregt = 448000,
	fusilade = 36000,
	jester = 240000,
	jester2 = 350000,
	kuruma = 95000,
	lynx = 1735000,
	massacro = 275000,
	massacro2 = 385000,
	omnis = 701000,
	penumbra = 24000,
	rapidgt = 140000,
	rapidgt2 = 150000,
	schafter3 = 140000,
	sultan = 12000,
	surano = 110000,
	tropos = 816000,
	verlierer2 = 695000,
	casco = 680000,
	coquette2 = 665000,
	jb700 = 350000,
	pigalle = 400000,
	stinger = 850000,
	stingergt = 875000,
	feltzer3 = 975000,
	ztype = 950000,
	adder = 1000000,
	banshee2 = 565000,
	bullet = 155000,
	cheetah = 650000,
	entityxf = 795000,
	sheava = 199500,
	fmj = 1750000,
	infernus = 440000,
	osiris = 1950000,
	le7b = 2475000,
	reaper = 1595000,
	sultanrs = 795000,
	t20 = 2200000,
	turismor = 500000,
	tyrus = 2550000,
	vacca = 240000,
	voltic = 150000,
	prototipo = 2700000,
	zentorno = 725000,
	blade = 160000,
	buccaneer = 29000,
	chino = 225000,
	coquette3 = 695000,
	dominator = 35000,
	dukes = 62000,
	gauntlet = 32000,
	hotknife = 90000,
	faction = 36000,
	nightshade = 585000,
	picador = 9000,
	sabregt = 15000,
	tampa = 375000,
	virgo = 195000,
	vigero = 21000,
	bifta = 75000,
	blazer = 8000,
	brawler = 715000,
	dubsta3 = 249000,
	dune = 20000,
	rebel2 = 22000,
	sandking = 38000,
	monster = 550000,
	trophytruck = 550000,
	baller = 90000,
	cavalcade = 60000,
	granger = 35000,
	huntley = 195000,
	landstalker = 58000,
	radi = 32000,
	rocoto = 85000,
	seminole = 30000,
	xls = 253000,
	bison = 30000,
	bobcatxl = 23000,
	gburrito = 65000,
	journey = 15000,
	minivan = 30000,
	paradise = 25000,
	rumpo = 13000,
	surfer = 11000,
	youga = 16000,
	asea = 1000000,
	asterope = 1000000,
	fugitive = 24000,
	glendale = 200000,
	ingot = 9000,
	intruder = 16000,
	premier = 10000,
	primo = 9000,
	primo2 = 9500,
	regina = 8000,
	schafter2 = 65000,
	stanier = 10000,
	stratum = 10000,
	stretch = 30000,
	superd = 250000,
	surge = 38000,
	tailgater = 55000,
	warrener = 120000,
	washington = 15000,
	AKUMA = 9000,
	bagger = 5000,
	bati = 15000,
	bati2 = 15000,
	bf400 = 95000,
	carbonrs = 40000,
	cliffhanger = 225000,
	daemon = 5000,
	double = 12000,
	enduro = 48000,
	faggio2 = 4000,
	gargoyle = 120000,
	hakuchou = 82000,
	hexer = 15000,
	innovation = 90000,
	lectro = 700000,
	nemesis = 12000,
	pcj = 9000,
	ruffian = 9000,
	sanchez = 7000,
	sovereign = 90000,
	thrust = 75000,
	vader = 9000,
	vindicator = 600000,
	
	
	
}

Thanks for doing that, alot of people prefer mysql, including myself, hopefully you can do the same with essentialmode

only buy no garage for stockage ?

Getting this error:

https://pastebin.com/LEb9R80B

[ 1123359] Error running call reference function for resource es_garages: server.lua:247: bad argument #1 to ‘for iterator’ (table expected, got nil)
[ 1123359] stack traceback:
[ 1123359] [C]: in for iterator ‘for iterator’
[ 1123359] server.lua:247: in local ‘ref’
[ 1123359] citizen:/scripting/lua/scheduler.lua:277: in function citizen:/scripting/lua/scheduler.lua:268
[ 1123359] [C]: in function ‘coroutine.resume’
[ 1123359] citizen:/scripting/lua/scheduler.lua:33: in field ‘CreateThreadNow’
[ 1123359] citizen:/scripting/lua/scheduler.lua:123: in function citizen:/scripting/lua/scheduler.lua:92
[ 1123375] Error running system event handling function for resource essentialmode: citizen:/scripting/lua/scheduler.lua:39: Failed to execute thread: citizen:/scripting/lua/MessagePack.lua:830: missing bytes
[ 1123375] stack traceback:
[ 1123375] [C]: in function ‘error’
[ 1123375] citizen:/scripting/lua/MessagePack.lua:830: in method ‘underflow’
[ 1123375] citizen:/scripting/lua/MessagePack.lua:465: in field ‘any’
[ 1123375] citizen:/scripting/lua/MessagePack.lua:860: in field ‘unpack’
[ 1123375] citizen:/scripting/lua/scheduler.lua:338: in local ‘cb’
[ 1123375] server/player/login.lua:77: in upvalue ‘handler’
[ 1123375] citizen:/scripting/lua/scheduler.lua:124: in function citizen:/scripting/lua/scheduler.lua:123
[ 1123375] stack traceback:
[ 1123375] [C]: in function ‘error’
[ 1123375] citizen:/scripting/lua/scheduler.lua:39: in field ‘CreateThreadNow’
[ 1123375] citizen:/scripting/lua/scheduler.lua:123: in function citizen:/scripting/lua/scheduler.lua:92

Any idea why garages arent showing up on the map ? it loads fine and create the db but some reason I can’t see them on the map. As well no error in the console

I’ve been getting the same error as well. I’ve tried deleting all local databases and deleting my entire cache folder but every time it gives me this error when I try to buy a vehicle. Have you had any luck getting it working?

Error running call reference function for resource es_garages: server.lua:247: bad argument #1 to ‘for iterator’ (table expected, got nil)
[ 1123359] stack traceback:
[ 1123359] [C]: in for iterator ‘for iterator’
[ 1123359] server.lua:247: in local ‘ref’
[ 1123359] citizen:/scripting/lua/scheduler.lua:277: in function citizen:/scripting/lua/scheduler.lua:268
[ 1123359] [C]: in function ‘coroutine.resume’
[ 1123359] citizen:/scripting/lua/scheduler.lua:33: in field ‘CreateThreadNow’
[ 1123359] citizen:/scripting/lua/scheduler.lua:123: in function citizen:/scripting/lua/scheduler.lua:92
[ 1123375] Error running system event handling function for resource essentialmode: citizen:/scripting/lua/scheduler.lua:39: Failed to execute thread: citizen:/scripting/lua/MessagePack.lua:830: missing bytes
[ 1123375] stack traceback:

Finally got it working for es_garages_v2! For some reason a local variable was being overwritten and then set to nil, hence the nil error above. I fixed it and now it works fine. If anyone is having similar problems with the mod loading but you cannot buy any vehicles try downloading the included file. This is for the v2 es_garages so I will post in that channel as well. May require additional modifications for this original version of es_garages.

es_garages.zip (7.5 KB)

1 Like

Hello, i need a script like that but it store your vehicles automatically when you left the server.
If someone have a script like this please pm to me.

help me i do not know how to do. how do i do the garage.

:tired_face:

Link don’t work :frowning:

how do you use it in game

No Discord in Releases.

Is there anyway to have the car go in damaged and come out with the same damage? instead of perfectly repaired.

I cant buy the cars?