formatting and typos

This commit is contained in:
DokaDoka committed 2022-12-11 15:00:43 +11:00
1 parent 75698216e0
commit 724c7e356d
99 files changed
+515 -305

No files matched your search

+10 -5
View File
@@ -1,4 +1,4 @@
Mostly follows the format used by ESX and QBCore, with extra data such as damaged/missing props.
Mostly follows the format used by ESX and QBCore, with extra data such as damaged/missing props.
https://github.com/overextended/ox_lib/blob/master/resource/vehicleProperties/client.lua#L5
import Tabs from '@theme/Tabs';
@@ -6,10 +6,10 @@ import TabItem from '@theme/TabItem';
### lib.getVehicleProperties
```ts
lib.getVehicleProperties(vehicle)
```
* vehicle: `entity`
<Tabs>
@@ -18,6 +18,7 @@ lib.getVehicleProperties(vehicle)
```lua
lib.getVehicleProperties(GetVehiclePedIsUsing(PlayerPedId()))
```
</TabItem>
<TabItem value='JS/TS'>
@@ -26,16 +27,18 @@ import lib from '@overextended/ox_lib/client'
lib.getVehicleProperties(GetVehiclePedIsUsing(PlayerPedId()))
```
</TabItem>
</Tabs>
### lib.setVehicleProperties
Requires the vehicle to belong to the client. _Do not use NetworkRequestControlOfEntity_.
```lua
lib.setVehicleProperties(vehicle, props)
```
* vehicle: `entity`
* props: `table` (`object`)
@@ -47,6 +50,7 @@ RegisterNetEvent('ox_lib:setVehicleProperties', function(netid, data)
lib.setVehicleProperties(NetToVeh(netid), data)
end)
```
</TabItem>
<TabItem value='JS/TS'>
@@ -57,13 +61,14 @@ onNet('ox_lib:setVehicleProperties', (netid, data) => {
lib.setVehicleProperties(NetToVeh(netid), data)
})
```
</TabItem>
</Tabs>
#### Recommended usage
The server should tell the owner of the entity to set properties, using the following trigger.
```lua
TriggerClientEvent('ox_lib:setVehicleProperties', entityOwner, vehNetId, data)
```