[standalone] save health armour upon disconnecting and set health armour when joined

Hey,
this is a simple script coded in lua for FiveM, saves health and armour when disconnecting and sets health and armour when connecting.

Works as standalone or with ESX and QBCORE frameworks. It is recommanded when you for example use esx_multicharacter to set in config ESX to true and standalone to false.

Download: GitHub
Dependency: mysql-async

OTHER PAID RELEASES FROM ME
[ESX] notbad-gruppe6-job
[ESX] notbad-ownable-shops
[ESX] notbad-mdt
[ESX] [QBCORE] notbad-lottery
[ESX] [QBCORE] notbad-voucher

OTHER FREE RELEASES FROM ME
[STANDALONE] notbad-livemap

5 Likes

Awesome script but am getting an sql error
~ Error loading script server.lua in resource evo-health: @qb-health/server.lua:22: attempt to index a nil value (global ‘MySQL’)~

1 Like

Yes you need mysql-async my bad, I will add it as dependency.

Works like a charme :wink:
Many thx for this nice, free release

EDIT: Your Link to the free livemap links to the false site :wink:

Thanks, fixed.

nice :clap:

Question ! If the player is dead wheb is disconect when he join the player is dead ?

use kvp for useless data

1 Like

does this work with oxmysql

Yes, he will be dead after connecting.

1 Like

Thanks for providing such a great script! <3

1 Like

can you make it save your guns and ammo and pocket example money as well

No, you are supposed to use framework for this.

it doesnt work for me

What framework do you use?

im on esx 1.9.3

doesnt work esx 1.8.5

encountering this error. how to fix this?

SCRIPT ERROR: @notbad-save-health-armour/server/main.lua:105: attempt to index a nil value (local ‘Player’) encountering this error

Do you use esx or qbcore or standalone?

Thanks bro. Work for me.