[RELEASE] d3x_vehicleshop

Screenshot by Lightshot ???

I have a problem.

error during NUI callback BuyVehicle: citizen:/scripting/lue/scheduler.lua:955: No such export PersistentHudText in resouce mythic_notify

I habe installet the new version of

can help me ?

1 Like

Hi all can any Help me to change the background and name like this eeebbf21fdf51b5e37ba7aa0b968a734bf606967_2_690x358

4 Likes

Found a fix for the test drive, i will upload it later!

oh you will be a god

I will give you my “fix” for test drive for this script which works 100% with latest artifact.

Just use the same ESX.GameSpawnVehicle function from ‘BuyVehicle’ so that test drive spawns in the same zone set in the config. Test drive doesn’t like distance.

That was my workaround which I used on my server and it works perfectly fine. Thank me later :slight_smile:

Mantouvios, share your fix bro!

1 Like

I thinck he forgot completly about it

If you got a fix, would be interested in taking a look at this resource again for sure!

Be sure to share :100:

RegisterNUICallback('TestDrive', function(data, cb) 
	SetNuiFocus(false, false)
	IsInShopMenu = false
	
	local model = data.model
	local playerPed = PlayerPedId()
	local playerpos = GetEntityCoords(playerPed)
	spawVehicle(model)
end)

function spawVehicle(model)
	--print(model)
	local playerPed = PlayerPedId()
	local playerpos = GetEntityCoords(playerPed)
    local car = GetHashKey(model)

    RequestModel(car)
    while not HasModelLoaded(car) do
        RequestModel(car)
        Citizen.Wait(0)
    end

    local vehicle = CreateVehicle(car, -1733.25, -2901.43, 12.94, 41.0, true, false)
    SetEntityAsMissionEntity(vehicle, true, true)
	SetEntityCoords(playerPed, -1733.25, -2901.43, 13.94, 41.0, false, false, false, false)
	Citizen.Wait(100)
	TaskWarpPedIntoVehicle(playerPed, vehicle, -1)
	ESX.ShowNotification('~h~~g~You have 40 second to test the car!')
	Citizen.Wait(40000)
	DeleteVehicle(vehicle)
	SetEntityCoords(playerPed, playerpos, false, false, false, false)
end

This works perfect for me…!

1 Like


do you know why this error?

1 Like

Have a problem. When I click on Buy or test drive, no car spawns and the window closes.

Vehicle entered everything but nothing spawns.

@Duart3x write: I am not supporting this script any more.

Is it possible that there is a mistake in the text?

spawVehicle(model) …spawn not spaw? here same same function spawVehicle

just a spelling error, still works right?

sv.lua (775 Bytes)

I made a Swedish Translation!

Love the script man!

1 Like

Is there a reason my test drive function wouldn’t be working? Never spawns the vehicle or teleports the player into a vehicle to drive.

1 Like

how can 1 cancel the old one in db says dublicate vehichles

I did every step correctly, but still the images arent showing. It wont even let me buy the car nor test drive it. Can someone help me with this?!

Same issue

hi, when want leav it… it bugs me and i cant walk , i cant text to chat… nothing… can somebody help ?