ox_core icon indicating copy to clipboard operation
ox_core copied to clipboard

Breaking changes

Open thelindat opened this issue 1 year ago • 4 comments

Compiled list of known breaking changes. Written with a focus on Lua syntax, but should be mostly consistent across languages.

Breaking changes from v0.19.0

Common

  • Lua imports path changed to @ox_core.lib.init
  • player.hasGroup filtering moved into player.getGroup
  • adminGrade is no longer used by groups

Server

  • Ox.CreateVehicle is now for creating new vehicles only - use Ox.SpawnVehicle to spawn using a dbId
  • Ox.GetPlayerByFilter renamed to Ox.GetPlayerFromFilter

Client

  • player replaced with Ox.GetPlayer()
  • Ox.GetPlayer() will always return an object - checks for active player can use player.charId
  • indexing player no longer calls player.get and must be explicit - i.e. player.get('gender')
  • player.groups is no longer valid, use player.getGroups() or player.getGroup(name)

SQL

  • character_licenses.issued has been replaced with character_licenses.data (see install.sql)

thelindat avatar Mar 03 '24 06:03 thelindat

CreateVehicle now use a array instead of vec3 for coords

CeebDev avatar Mar 06 '24 23:03 CeebDev

CreateVehicle now use a array instead of vec3 for coords

It should accept an array, map, or vector.

thelindat avatar Mar 07 '24 00:03 thelindat

It should accept an array, map, or vector.

Then it's a problem, when i log coord it return a buffer and vehicle spawn at 0, 0, 0

This is related : forum.cfx.re/t/lua-vectors-dont-serialize-to-arrays-through-events/4772780/2

CeebDev avatar Mar 07 '24 12:03 CeebDev

Ox.GetPlayerByFilter is replaced by Ox.GetPlayerFromFilter

CeebDev avatar Mar 09 '24 20:03 CeebDev