Update docs (#96)

* Update docs

* CPlayer -> OxPlayer

Removed functions.md
index.md includes player?

* fix

CVehicle -> OxVehicle
Added missing dot to end of sentence
Consistency with rest of docs
This commit is contained in:
SumnDaiy authored and GitHub committed 2023-02-14 00:24:46 +11:00
1 parent 0fd6873fdf
commit 1ba636a6e6
5 files changed
+45 -15

No files matched your search

+11
View File
@@ -25,3 +25,14 @@ lib.callback.await('ox:getLicense', delay, licenseName, targetId)
- The name of the license to get data for. Can be omitted to return all licenses.
- targetId?: `number`
- The server id to get license data for, defaulting to the current player.
### ox:getNearbyVehicles
```lua
lib.callback.register('ox:getNearbyVehicles', function(radius)
```
Returns an array of vehicle netids within a given radius of the player's location.
- radius?: `number`
- The radius from the player's location to return vehicles.
+19
View File
@@ -2,3 +2,22 @@
title: Client
sidebar_position: 1
---
### player
The player variable refers to the result of [Ox.GetPlayerData](https://github.com/overextended/ox_core/blob/main/client/player.lua#L48) unless reassigned.
**Example:**
```lua
print(json.encode(player, { indent = true }))
```
- player?: `table`
- name: `string`
- firstname: `string`
- lastname: `string`
- userid: `number`
- charid: `number`
- groups: `table`
- gender: `string`
+2 -2
View File
@@ -8,7 +8,7 @@ import TabItem from '@theme/TabItem';
## Ox.GetPlayer
Return an instance of CPlayer for the given player source.
Return an instance of OxPlayer for the given player source.
<Tabs>
<TabItem value='lua' label='Lua'>
@@ -32,7 +32,7 @@ console.log(JSON.stringify(player));
## Ox.GetPlayerByFilter
Return the first CPlayer that matches the filter properties.
Return the first OxPlayer that matches the filter properties.
<Tabs>
<TabItem value='lua' label='Lua'>