Great, thank you!
how to change sound lock ??
Into the esx_carlock server.lua
Would anyone be able to tell me why I can’t seem to change the notification to Mythic Notify?
All I’ve changed is ‘ESX.ShowNotification’ to
‘exports[‘mythic_notify’]:DoHudText(‘inform’, ‘No vehicles to lock nearby’)’
When I have no cars nearby, I get the notification fine, but when I do have a car nearby that I own it stops giving me notifications and doesn’t run any functions.
exports['mythic_notify']:DoHudText('inform', 'No vehicles to lock nearby')
else
for j=1, #cars, 1 do
local coordscar = GetEntityCoords(cars[j])
local distance = Vdist(coordscar.x, coordscar.y, coordscar.z, coords.x, coords.y, coords.z)
table.insert(cars_dist, {cars[j], distance})
end```
when i lock the car and i try to go in my player break the window and go in how i can fix that
Eee cevaplayan kimse olmadı ve sesi biz değiştirdik kimseden yardım almadan senin gibi değiliz yani
Hello, it does not work with work vehicles, my server.lua.
Could you help us, what are we doing wrong?
Thanks for your time
ESX = nil
TriggerEvent(‘esx:getSharedObject’, function(obj) ESX = obj end)
ESX.RegisterServerCallback(‘carlock:isVehicleOwner’, function(source, cb, plate)
local identifier = GetPlayerIdentifier(source, 0)
MySQL.Async.fetchAll('SELECT owner FROM owned_vehicles WHERE owner = @owner AND plate = @plate', {
['@owner'] = identifier,
['@plate'] = plate
}, function(result)
if result[1] then
cb(result[1].owner == identifier)
else
cb(false)
end
end)
end)
ESX.RegisterServerCallback(‘carlock:isVehicleOwnerSociety’, function(source, cb, plate)
local xPlayer = ESX.GetPlayerFromId(source)
local job = nil
if xPlayer.job.name == 'garbage' then
job = 'garbage'
else
job = 'unemployed'
end
MySQL.Async.fetchAll('SELECT owner FROM owned_vehicles WHERE owner = @owner AND plate = @plate', {
['@owner'] = 'society:' .. job,
['@plate'] = plate
}, function(result)
if result[1] then
cb(result[1].owner == 'society:' .. job)
else
cb(false)
end
end)
end)
found out how you change the sound?
Hello guys.
How can find this error?
Failed to load script @mysql-async/lib/MySQL.lua
i use newest version mysql-async, async, esplugin-mysql, and vehicleshop.
Did u get this working? Want to try and get it onto my server
Added blinking lights when you lock your car
Sorry I’m late, my server is quite old and MySQL-async could be outdated. However I also get this error but it does work, so I just ignore it.
There is a an exploit when player parked his unlocked car near the another players locked vehicle and then stand between them vehicles then pressed u that player can access another players trunk (Must turn around and face the others player vehicle to work)
thanks for sharing
Hello,
Are you talking about accessing to a vehicle that you don’t own or accessing to a trunk (with something like esx_vehicle_inventory) ?
Yes sir, and it’s them trunk inventories
if lock == 1 or lock == 0 then
SetVehicleDoorShut(carstrie[i], 0, false)
SetVehicleDoorShut(carstrie[i], 1, false)
SetVehicleDoorShut(carstrie[i], 2, false)
SetVehicleDoorShut(carstrie[i], 3, false)
SetVehicleDoorsLocked(carstrie[i], 2)
PlayVehicleDoorCloseSound(carstrie[i], 1)
SetVehicleLights(carstrie[i], 2)--активируем световой индикатор сигнализации
added line SetVehicleLights(carstrie[i], 2)
Okay, so go to esx_vehicle_inventory/client/main.lua. Then go to line 101, you should find something like this
if locked == 1 or class == 15 or class == 16 or class == 14 then
Change it to
if locked == 1 or locked == 2 or class == 15 or class == 16 or class == 14 then
People shouldn’t be able to access a locked vehicle’s trunk anymore