diff --git a/pages/ox_core/Classes/Server/OxAccount.mdx b/pages/ox_core/Classes/Server/OxAccount.mdx index 0cfdfd9c17..073ddac392 100644 --- a/pages/ox_core/Classes/Server/OxAccount.mdx +++ b/pages/ox_core/Classes/Server/OxAccount.mdx @@ -19,7 +19,7 @@ title: OxAccount ## OxAccount.get -Get the value of specific key(s) from account metadata. +Get the value of specific key(s) from the account's metadata. ```lua account.get(key) diff --git a/pages/ox_core/Classes/Server/OxPlayer.mdx b/pages/ox_core/Classes/Server/OxPlayer.mdx index 367cefdd6b..fb6ee0d87f 100644 --- a/pages/ox_core/Classes/Server/OxPlayer.mdx +++ b/pages/ox_core/Classes/Server/OxPlayer.mdx @@ -104,7 +104,7 @@ player.emit(eventName, ...args) ## OxPlayer.get -Returns a value from the players metadata. +Get the value of specific key from the player's metadata. ```lua player.get(key) @@ -119,6 +119,19 @@ player.get(key) - `unknown` +## OxPlayer.getAccount + +Returns the player's default account. + +```lua +player.getAccount() +``` + +**Returns** + +- `OxAccount` + + ## OxPlayer.getCoords Returns the player's current coordinates. @@ -218,6 +231,19 @@ player.getLicenses() - `[key: string]: any` +## OxPlayer.getState + +Returns the player's statebag interface. + +```lua +player.getState() +``` + +**Returns** + +- `StateBagInterface` + + ## OxPlayer.getStatus Returns the value of the status. @@ -346,7 +372,7 @@ player.save() ## OxPlayer.set -Stores a value in the players metadata, which can be optionally synced with the client. +Stores a value in the player's metadata, which can be optionally synced with the client. ```lua player.set(key, value, replicated) diff --git a/pages/ox_core/Classes/Server/OxVehicle.mdx b/pages/ox_core/Classes/Server/OxVehicle.mdx index 8d192d2e33..54e684f4ba 100644 --- a/pages/ox_core/Classes/Server/OxVehicle.mdx +++ b/pages/ox_core/Classes/Server/OxVehicle.mdx @@ -2,7 +2,7 @@ title: OxVehicle --- -# OxVehicle +## OxVehicle - entity: `number` - make: `string` @@ -12,4 +12,183 @@ title: OxVehicle - group?: `string` - id?: `number` - owner?: `number` -- vin?: `string` \ No newline at end of file +- vin?: `string` + +## OxVehicle.delete + +Despawns the vehicle and removes it from the database. + +```lua +vehicle.delete() +``` + + +## OxVehicle.despawn + +Despawns the vehicle, optionally saving it to the database. + +```lua +vehicle.despawn(save) +``` + +**Parameters** + +- save?: `boolean` + + +## OxVehicle.get + +Get the value of specific key from the vehicless's metadata. + +```lua +vehicle.get(key) +``` + +**Parameters** + +- key: `string` + +**Returns** + +- `unknown` + + +## OxVehicle.getCoords + +Returns the vehicle's current coordinates. + +```lua +vehicle.getCoords(): Vector3 +``` + + +## OxVehicle.getState + +Returns the vehicle's statebag interface. + +```lua +vehicle.getState() +``` + +**Returns** + +- `StateBagInterface` + + +## OxVehicle.getStored + +Returns the vehicle's "stored" state. + +```lua +vehicle.getStored() +``` + +**Returns** + +- `string?` + + +## OxVehicle.respawn + +Spawns a new entity for the vehicle, removing an existing entity if it exists and reapplying stored vehicle properties. + +```lua +vehicle.respawn(coords, rotation) +``` + +**Parameters** + +- coords?: `vector3` +- rotation?: `vector3` + + +## OxVehicle.save + +Saves the vehicle to the database. + +```lua +vehicle.save() +``` + +**Returns** + +- `number` + + +### OxVehicle.set + +Stores a value in the vehicle's metadata, which will be saved to the database (_this behaviour is likely to be removed_). + +```lua +player.set(key, value) +``` + +**Parameters** + +- key: `string` +- value: `any` + + +## OxVehicle.setGroup + +Sets the vehicle as a group vehicle "owned" by the given group name, or removes the group if omitted. + +```lua +vehicle.setGroup(groupName) +``` + +**Parameters** + +- groupName?: `string` + + +## OxVehicle.setOwner + +Sets the owner of a vehicle as the given charId, or removes the owner if omitted. + +```lua +vehicle.setOwner(charId) +``` + +**Parameters** + +- charId?: `number` + + +## OxVehicle.setPlate + +Sets the registered plate of a vehicle to the given value. The plate will be padded or stripped to 8 characters. + +This plate is not necessarily the displayed plate on vehicle properties. + +```lua +vehicle.setPlate(plate: string) +``` + + +## OxVehicle.setProperties + +Saves the properties (mods, extras, etc.) stored on the vehicle, optionally applying them to the entity. + +```lua +vehicle.setProperties(properties, apply) +``` + +**Parameters** + +- properties: `VehicleProperties` +- apply?: `boolean` + + +## OxVehicle.setStored + +Sets the vehicle as "stored" at the given value (e.g. impound, garage, null), and optionally despawns the vehicle. + +```lua +vehicle.setStored(value, despawn) +``` + +**Parameters** + +- value?: `string` +- despawn?: `boolean` \ No newline at end of file diff --git a/pages/ox_core/Classes/Server/OxVehicle/delete.mdx b/pages/ox_core/Classes/Server/OxVehicle/delete.mdx deleted file mode 100644 index 2db109b8a7..0000000000 --- a/pages/ox_core/Classes/Server/OxVehicle/delete.mdx +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: delete ---- - -# OxVehicle.delete - -Description.. - -```lua -vehicle.delete() -``` diff --git a/pages/ox_core/Classes/Server/OxVehicle/despawn.mdx b/pages/ox_core/Classes/Server/OxVehicle/despawn.mdx deleted file mode 100644 index 94bcd1231c..0000000000 --- a/pages/ox_core/Classes/Server/OxVehicle/despawn.mdx +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: despawn ---- - -# OxVehicle.despawn - -Description.. - -```lua -vehicle.despawn(save?: boolean) -``` diff --git a/pages/ox_core/Classes/Server/OxVehicle/get.mdx b/pages/ox_core/Classes/Server/OxVehicle/get.mdx deleted file mode 100644 index 241917094f..0000000000 --- a/pages/ox_core/Classes/Server/OxVehicle/get.mdx +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: get ---- - -# OxVehicle.get - -Description.. - -```lua -vehicle.get(key: string): unknown -``` diff --git a/pages/ox_core/Classes/Server/OxVehicle/getCoords.mdx b/pages/ox_core/Classes/Server/OxVehicle/getCoords.mdx deleted file mode 100644 index c84e23db50..0000000000 --- a/pages/ox_core/Classes/Server/OxVehicle/getCoords.mdx +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: getCoords ---- - -# OxVehicle.getCoords - -Description.. - -```lua -vehicle.getCoords(): Vector3 -``` diff --git a/pages/ox_core/Classes/Server/OxVehicle/save.mdx b/pages/ox_core/Classes/Server/OxVehicle/save.mdx deleted file mode 100644 index 0bf7cf1d15..0000000000 --- a/pages/ox_core/Classes/Server/OxVehicle/save.mdx +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: save ---- - -# OxVehicle.save - -Description.. - -```lua -vehicle.save(): Promise -``` diff --git a/pages/ox_core/Classes/Server/OxVehicle/set.mdx b/pages/ox_core/Classes/Server/OxVehicle/set.mdx deleted file mode 100644 index e8314554b5..0000000000 --- a/pages/ox_core/Classes/Server/OxVehicle/set.mdx +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: set ---- - -# OxVehicle.set - -Description.. - -```lua -vehicle.set(key: string, value: any): Promise -``` diff --git a/pages/ox_core/Classes/Server/OxVehicle/setGroup.mdx b/pages/ox_core/Classes/Server/OxVehicle/setGroup.mdx deleted file mode 100644 index 9a8d2e0435..0000000000 --- a/pages/ox_core/Classes/Server/OxVehicle/setGroup.mdx +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: setGroup ---- - -# OxVehicle.setGroup - -Description.. - -```lua -vehicle.setGroup(groupName?: string) -``` diff --git a/pages/ox_core/Classes/Server/OxVehicle/setOwner.mdx b/pages/ox_core/Classes/Server/OxVehicle/setOwner.mdx deleted file mode 100644 index 402eec6b89..0000000000 --- a/pages/ox_core/Classes/Server/OxVehicle/setOwner.mdx +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: setOwner ---- - -# OxVehicle.setOwner - -Description.. - -```lua -vehicle.setOwner(charId?: number) -``` diff --git a/pages/ox_core/Classes/Server/OxVehicle/setPlate.mdx b/pages/ox_core/Classes/Server/OxVehicle/setPlate.mdx deleted file mode 100644 index bb386d48ef..0000000000 --- a/pages/ox_core/Classes/Server/OxVehicle/setPlate.mdx +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: setPlate ---- - -# OxVehicle.setPlate - -Description.. - -```lua -vehicle.setPlate(plate: string) -``` diff --git a/pages/ox_core/Classes/Server/OxVehicle/setStored.mdx b/pages/ox_core/Classes/Server/OxVehicle/setStored.mdx deleted file mode 100644 index bb38bb4c6f..0000000000 --- a/pages/ox_core/Classes/Server/OxVehicle/setStored.mdx +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: setStored ---- - -# OxVehicle.setStored - -Description.. - -```lua -vehicle.setStored(value?: string, despawn?: boolean) -```