mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 17:28:53 +00:00
Improved saving loadouts (see desc)
- Only save weapon components if needed, wont save default clip anymore, and if no other component is available then its not saved at all - Tint index not stored if not above 0 - Weapon label not saved in database since its useless - Validate weapon on player load
This commit is contained in:
@@ -182,7 +182,7 @@ ESX.SavePlayer = function(xPlayer, cb)
|
||||
MySQL.Async.execute('UPDATE users SET job = @job, job_grade = @job_grade, loadout = @loadout, position = @position, inventory = @inventory WHERE identifier = @identifier', {
|
||||
['@job'] = xPlayer.job.name,
|
||||
['@job_grade'] = xPlayer.job.grade,
|
||||
['@loadout'] = json.encode(xPlayer.getLoadout()),
|
||||
['@loadout'] = json.encode(xPlayer.getLoadout(true)),
|
||||
['@position'] = json.encode(xPlayer.getCoords()),
|
||||
['@identifier'] = xPlayer.identifier,
|
||||
['@inventory'] = json.encode(xPlayer.getInventory(true))
|
||||
|
||||
Reference in New Issue
Block a user