you have not pasted the code on the server-side. make server script and paste the code below there and don’t forget to initialize ESX.

Paste this.

ESX.RegisterServerCallback('isVehicleOwned', function(playerId, cb, vehiclePlate)
    local xPlayer = ESX.GetPlayerFromId(playerId);

    if (not xPlayer) then return end;

    MySQL.Async.fetchScalar('SELECT `owner` FROM `owned_vehicles` WHERE @plate = `plate`;', {
        ['@plate'] = vehiclePlate;
    }, function(Owner)
        cb(Owner ~= nil)
    end)
end)

I already do, i’m sure

I just want to break npc car window, i’m not interesting about owned vehicles now .
something is broken in the script. if you can send me the files will be better