overextended/ox_core

Breaking changes

thelindat opened this issue · 2 comments

I've been delaying some changes as they aren't overly important and it's annoying to frequently have to deal with breaking changes.
The next version will still be a pre-release (don't get your hopes up) but I want to get some important changes done before I release v1.0.

Change player metadata (player.get, player.set) to use statebags.

Groups and some other values used to be stored in metadata, but were moved to the so-called "private" table.
Most of these values aren't used internally and none are saved (exception for dead/isDead).

This is pending statebag filtering to allow rejection of state changes from the client.

Consistent player property naming

There's some inconsistencies to resolve, i.e. some player data is indexed as all lowercase (dateofbirth, stateid) or camelCase (phoneNumber, isDead).
The same applies to the database where we have is_dead, dateofbirth, and phone_number. I believe snake_case is more standard for tables and columns; but matching variable names may be simpler.

"player" global

Might be better to use Ox.Player or such to prevent accidental reassignment, variable shadowing, or other issues.

Stored procedures

Would be very useful, but adds complexity to setup if users don't have CREATE PROCEDURE permissions.

Accounts

Working on accounts once again. The initial implementation was a bit annoying to use, and then pefcl had everything we needed.
Once banking has the basics in place I'll merge the accounts branch and we will continue to improve from there.

Can see about keeping a wrapper in place to override the standard account behaviour for pefcl.

Appearance

ox_appearance solely exists to save and load appearance data for fivem-appearance.
Will look at using illenium-appearance since the UI source code was made available.

With the TS rewrite, illenium-appearance is now the default option. No appearance stuff is being handled internally, to simplify compatibility.

Other parts of this are still somewhat relevant to the current state of the repo - still waiting on statebags to be usable/secure.... v1 in 2028 maybe.

Most of this is irrelevant and either implemented (accounts, illenium-appearance, consistent player properties) or scrapped.