Skip to content

Commit

Permalink
complete some ox_core function definitions
Browse files Browse the repository at this point in the history
i hate doing this
  • Loading branch information
thelindat committed Oct 17, 2024
1 parent f8e68f0 commit 9258662
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 11 deletions.
23 changes: 19 additions & 4 deletions pages/ox_core/Functions/Common/GetTopVehicleStats.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,26 @@
title: GetTopVehicleStats
---

# Ox.GetTopVehicleStats
## Ox.GetTopVehicleStats

Description..
Returns an object containing the top vehicle stats, either overall or for a specific category (land, air, sea).

```lua
Ox.GetTopVehicleStats(): Record<VehicleCategories, VehicleStats>
Ox.GetTopVehicleStats(category: VehicleCategories): VehicleStats
Ox.GetTopVehicleStats(category)
```

**Parameters**

- category?: `string`

**Returns**

- `VehicleStats` | `{ [string]: VehicleStats }`

## VehicleStats
- `object`
- acceleration: `number`
- braking: `number`
- handling: `number`
- speed: `number`
- traction: `number`
27 changes: 22 additions & 5 deletions pages/ox_core/Functions/Common/GetVehicleData.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,29 @@
title: GetVehicleData
---

# Ox.GetVehicleData
## Ox.GetVehicleData

Description..
Returns VehicleData for all vehicles, or optionally a specific model or array of models.

```lua
Ox.GetVehicleData(): Record<string, VehicleData>
Ox.GetVehicleData(filter: string): VehicleData
OX.GetVehicleData(filter: string[]): Record<string, VehicleData>
Ox.GetVehicleData(filter)
```

**Parameters**

- filter?: `string` | `string[]`

**Returns**

- `{ [string]: VehicleData }` | `VehicleData`

## VehicleData
- `object`
- class: `VehicleClasses`
- doors: `number`
- make: `string`
- name: `string`
- price: `number`
- seats: `number`
- type: `string`
- weapons?: `true`
19 changes: 19 additions & 0 deletions pages/ox_core/Functions/Common/GetVehicleNetworkType.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: GetVehicleNetworkType
---

## Ox.GetVehicleNetworkType

Returns the netobj type of a vehicle model, which may differ from the vehicle type (e.g. blimp is networked as heli).

```lua
Ox.GetVehicleNetworkType(modelName)
```

**Parameters**

- modelName: `string`

**Returns**

- `string`
19 changes: 17 additions & 2 deletions pages/ox_core/Functions/Server/CreateVehicle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,29 @@ title: CreateVehicle

# Ox.CreateVehicle

Description..
Creates a new vehicle, which will be saved to the database if it has an assigned owner or group.

```lua
Ox.CreateVehicle({
model: string,
owner?: number,
group?: string,
stored?: number,
stored?: string,
properties?: object
}, coords?: Vector3, heading?: number): OxVehicle
```

**Parameters**

- data: `string` | `object`
- model: `string`
- owner?: `number`
- group?: `string`
- stored?: `string`
- properties?: `object`
- coords?: `vector3`
- heading?: `number`

**Returns**

- `OxVehicle`

0 comments on commit 9258662

Please sign in to comment.