Helper

Prints

Many times you should help yourself with the prints(), these are tools to see the values ​​of each variable, for example sometimes it is confusing or you do not know where you are wrong, you can put several prints and see which is the correct value for example:

You can divide the prints by commas so you don't have to write more, you can print values ​​but also letters

You can use this option if you know what you are doing and you have basic knowledge, this is just a tip to help you if you are having a little difficulty

print(vehicleData.model, vehicleData.name, vehicleData.other) -- example

print('Model : ', vehicleData.model) -- example

ESX.TriggerServerCallback('esx_vehicleshop:buyVehicle', function(success)
	if success then
		IsInShopMenu = false
		menu2.close()
		menu.close()
		DeleteDisplayVehicleInsideShop()
		FreezeEntityPosition(playerPed, false)
		SetEntityVisible(playerPed, true)
		-- And you can go try until you have the values ​​you need
		print(vehicleData.model, vehicleData.name, vehicleData.other)
	else
		ESX.ShowNotification(TranslateCap('not_enough_money'))
	end
end, vehicleData.model, generatedPlate)

Obtain the plate natively

This is a simple copy and paste code to integrate it into your code to obtain the plate.

local model = GetDisplayNameFromVehicleModel(GetEntityModel(veh))
local plate = GetVehicleNumberPlateText(veh)

Last updated