[ESX TEAM | Q&A] ESX Legacy. Have any issues or questions regarding ESX Legacy? Ask them here :)

PLEASE BE DETAILED ABOUT YOUR QUESTIONS AND DESCRIPTIVE ABOUT YOUR ISSUES, ANY IMAGES, ERROR CODES IN F8 or Console, ETC HELPS US RESOLVE YOUR ISSUE FASTER!!!

Hello From the ESX Team!
We have noticed there is alot of confusion and issues around ESX Legacy, so here we are!

ANY questions you have, please ask them here and someone from either the Official ESX Team or someone in the community will answer :slight_smile:

Frequently Asked questions will be added to the list bellow.

FAQ:

Question: How Do I install ESX?

Answer: We have a detailed explanation on Our Documentation page!

Question: What is the difference Between ESX Legacy and v1-final/1.2?

Answer: Legacy Has a lot of optimisations! It comes with an official ESX Multicharacter, uses the new oxmysql instead of mysql-async. It fixed major bugs that come with v1-final and addresses alot of the security issues in the original ESX, in a more Efficient way. Legacy Also re-adds the use of Spawnmanger to Spawn the player.

Question: Why Do I spawn in a random place?

Answer: Ensure that you are not using any of these Resources:

  • essentialmode
  • basic-gamemode
  • fivem-map-skater
  • fivem-map-hipster
  • default_spawnpoint

Question: Will [insert script name here] Work on legacy?

99% of Scripts made for v1-final and 95% of the scripts for 1.2 will work with ESX Legacy. However,if the the script is made for 1.1 or essentialmode, It will not work with ESX Legacy.
The Reasons a v1-final Script May Not Be compatible: Changes the Logic for Spawning Players
The Reasons a 1.2 Script May Not Be compatible: V1-Final Reasons, Uses the User_accounts database table.

Question: What is the versioning Order for ESX?

The versions are as follows (Earliest → Newest)
1.0 → 1.0.4 → 1.1 → 1.2 → V1-FInal → ESX Legacy (1.3) → ESX Legacy (1.4)

6 Likes

Hello, Do you have a recipe deployer for the latest revision?

Go to your resource folder, open a CMD and insert this: git clone https://github.com/esx-framework/esx-legacy. After that, just copy-paste the [esx] and [esx_addons] folders into your resource folder. Then deploy the sql files who are into [SQL] into your database. Hope it works!

yep it worked thanks, just the SPL’s being a pain

Remove the dump coding and… take a look. Correct me if there’s a better method but I got all the imports in successfully.

1 Like

yeah :slight_smile: , the latest version of legacy has a combined sql that doesnt have them parts :slight_smile:

1 Like

When im delete

    • fivem-map-skater
    • fivem-map-hipster
    • basic-gamemode

I’m stuck in the loadingscreen

  1. Are you on the latest version?
  2. are you getting any errors in your server console?

Yes, I use the latest version
And there is no apparent error

Make sure you have spawnmanager started :slight_smile:

2 Likes

Nice Its Work :ok_hand:

Is there esx-legacy using mysql-async
I Needed Plz :smiling_face_with_tear:

Oxmysql is 100% compatible with and over 1000x faster than mysql async

1 Like

The problem I’m facing is that I have files that use mysql-async and I can’t change them easily

That isnt a problem, they will automatically work with oxmysql without any changes needed :slightly_smiling_face:

1 Like

No, it does not work because there is a difference in many things
**Example : **

**This is on the system oxmysql : **

MySQL.single('SELECT id, price FROM cardealer_vehicles WHERE vehicle = ?', {vehicleModel},

And this is on the system mysql-async

MySQL.Async.fetchAll('SELECT id, price FROM cardealer_vehicles WHERE vehicle = @vehicle LIMIT 1', { ['@vehicle'] = vehicleModel },

There is a large between the two lines

1 Like

Or another example for an entire line :

This is on the system oxmysql :

ESX.RegisterServerCallback('esx_vehicleshop:giveBackVehicle', function(source, cb, plate)
    MySQL.single('SELECT base_price, vehicle FROM rented_vehicles WHERE plate = ?', {plate},
    function(result)
        if result then
            local vehicle = result.vehicle
            local basePrice = result.base_price
            MySQL.update('DELETE FROM rented_vehicles WHERE plate = ?', {plate},
            function(rowsChanged)
                MySQL.insert('INSERT INTO cardealer_vehicles (vehicle, price) VALUES (?, ?)', {result.vehicle, result.base_price})
                RemoveOwnedVehicle(plate)
                cb(true)
            end)
        else
            cb(false)
        end
    end)
end)

And this is on the system mysql-async :

ESX.RegisterServerCallback('esx_vehicleshop:giveBackVehicle', function(source, cb, plate)
    MySQL.Async.fetchAll('SELECT base_price, vehicle FROM rented_vehicles WHERE plate = @plate', {
        ['@plate'] = plate
    }, function(result)
        if result[1] then
            local vehicle = result[1].vehicle
            local basePrice = result[1].base_price
            MySQL.Async.execute('DELETE FROM rented_vehicles WHERE plate = @plate', {
                ['@plate'] = plate
            }, function(rowsChanged)
  MySQL.Async.execute('INSERT INTO cardealer_vehicles (vehicle, price) VALUES (@vehicle, @price)', {
                    ['@vehicle'] = vehicle,
                    ['@price']   = basePrice
                })
                RemoveOwnedVehicle(plate)
                cb(true)
            end)
        else
            cb(false)
        end
    end)
end)

First, please consider using code blocks for your code. Just pasting it into a wysiwyg editor breaks code, strips tabs, hides characters and makes it nearly impossible to sort through. Use three backticks to start and end the code block.

if doneThisWay == 1 then
   global peopleCanHelp = true
end

Secondly, just because the MySQL code in your resource is using a different function doesn’t mean that it will only work in one or the other SQL wrapper. As stated, it’s just a wrapper for connection to your MySQL server. Just because you’re using one or the other doesn’t change the capability of your MySQL server. You can most definitely change how your SQL statements are formatted but if it works one way while not the other, that’s having to do with your server’s capabilities, not the resource.

1 Like

First of all, thank you for the info, I didn’t know about this

I mean I have more than 150 resources and I can’t change the mysql-async system because that’s a lot of things to change so I was asking if there is a version of esx-legacy that uses mysql-async !

[ script:es_extended] SCRIPT ERROR: @es_extended/server/functions.lua:272: attempt to index a nil value (field ‘UsableItemsCallbacks’)

How do i fix tgis thie someone help :frowning: im using esx legacy