mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-01 22:21:48 +00:00
formatting and typos
This commit is contained in:
1 parent
75698216e0
commit
724c7e356d
99 files changed
+515
-305
No files matched your search
@@ -4,7 +4,7 @@ We'll try to explain some technical but core concepts used in ox_core here.
|
||||
|
||||
## Classes
|
||||
|
||||
Lua doesn't have support for true clases, but rather prototype-based inheritance.
|
||||
Lua doesn't have support for true classes, but rather prototype-based inheritance.
|
||||
A prototype can hold its own variables and methods, which another object (an instance) can reference or call.
|
||||
|
||||
```lua
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Config
|
||||
|
||||
Resource configuration is handled using [convars](https://docs.fivem.net/docs/scripting-reference/convars/).
|
||||
Resource configuration is handled using [convars](https://docs.fivem.net/docs/scripting-reference/convars/).
|
||||
|
||||
```yml
|
||||
```yaml
|
||||
# Players must have a valid identifier to join the server. Used to fetch userid from the database.
|
||||
set ox:primaryIdentifier "fivem"
|
||||
|
||||
|
||||
@@ -14,14 +14,14 @@ Lua imports can be defined as part of fxmanifest, or loaded with the load functi
|
||||
|
||||
```lua
|
||||
client_scripts {
|
||||
'@ox_core/imports/client.lua',
|
||||
'client/main.lua',
|
||||
'@ox_core/imports/client.lua',
|
||||
'client/main.lua',
|
||||
}
|
||||
|
||||
server_scripts {
|
||||
'@oxmysql/lib/MySQL.lua',
|
||||
'@ox_core/imports/server.lua',
|
||||
'server/main.lua',
|
||||
'@oxmysql/lib/MySQL.lua',
|
||||
'@ox_core/imports/server.lua',
|
||||
'server/main.lua',
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -10,12 +10,12 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
:::caution
|
||||
|
||||
This resource is **not production ready**. Breaking changes are guaranteed, and support is limited.
|
||||
This resource is **not production ready**. Breaking changes are guaranteed, and support is limited.
|
||||
Documentation may fall behind and be rendered obsolete.
|
||||
|
||||
:::
|
||||
|
||||
We **strongly** recommend using Git to help with version control and separating your own changes from the original source code.
|
||||
We **strongly** recommend using Git to help with version control and separating your own changes from the original source code.
|
||||
Refer to [GitHub's guide to setting up Git](https://docs.github.com/en/get-started/quickstart/set-up-git#setting-up-git).
|
||||
|
||||
You can also download a Git GUI client, such as [GitKraken](https://www.gitkraken.com/), to improve your workflow and more easily maintain changes.
|
||||
@@ -38,7 +38,7 @@ These resources are required for ox_core to function, and must start before it.
|
||||
- Open a terminal, command prompt, etc. and navigate to your resources folder.
|
||||
- Execute the following commands
|
||||
|
||||
```
|
||||
```bash
|
||||
npm install --location=global pnpm
|
||||
git clone https://github.com/overextended/ox_core.git
|
||||
cd web
|
||||
@@ -72,7 +72,7 @@ Phone with many built-in apps such as Twitter, Marketplace, and Notes; with supp
|
||||
|
||||
### pefcl
|
||||
|
||||
Banking and financing, with support for multiple, unique, and shared accounts.
|
||||
Banking and financing, with support for multiple, unique, and shared accounts.
|
||||
If using it with [ox_inventory](https://github.com/overextended/ox_inventory), open `pefcl/config.json` and enable framework integration.
|
||||
|
||||
```json
|
||||
|
||||
@@ -38,8 +38,6 @@ Triggered when the player's grade in a group is modified on the server with `pla
|
||||
RegisterNetEvent('ox:setGroup', function(source, group, grade) end)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### ox:licenseAdded
|
||||
|
||||
Triggered when the player has been granted a license.
|
||||
|
||||
@@ -44,7 +44,7 @@ Triggered when a player has been granted a license.
|
||||
AddEventHandler('ox:licenseAdded', function(source, name) end)
|
||||
```
|
||||
|
||||
### ox:licenseAdded
|
||||
### ox:licenseRemoved
|
||||
|
||||
Triggered when a player's license is revoked.
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ player.set(key, value, replicated)
|
||||
|
||||
## player.setdb
|
||||
|
||||
Update the player's metadata and store in the DB, optionally syncing it with the client.
|
||||
Update the player's metadata and store in the DB, optionally syncing it with the client.
|
||||
Note: These values are not synced to the client on login; you will need to use `player.set`.
|
||||
|
||||
```lua
|
||||
@@ -77,7 +77,7 @@ Returns the player's current grade for a given group.
|
||||
player.getGroup()
|
||||
```
|
||||
|
||||
## player.getGroup
|
||||
## player.getGroups
|
||||
|
||||
Returns an object of all groups the player is in, with the current grade as the value.
|
||||
|
||||
@@ -87,7 +87,7 @@ player.getGroups()
|
||||
|
||||
## player.hasGroup
|
||||
|
||||
Check if the player is a member of a given group, and returns the matching group name and grade.
|
||||
Check if the player is a member of a given group, and returns the matching group name and grade.
|
||||
The filter can be a string, array, or object where key is the group, and value is the minimum grade.
|
||||
|
||||
```lua
|
||||
|
||||
@@ -12,4 +12,3 @@ lib.callback.await('ox:getNearbyVehicles', playerId, radius)
|
||||
|
||||
- playerId: `number`
|
||||
- radius?: `number`
|
||||
|
||||
@@ -27,7 +27,7 @@ end
|
||||
|
||||
## Ox.CreateVehicle
|
||||
|
||||
Spawns a vehicle and returns the instance of CVehicle.
|
||||
Spawns a vehicle and returns the instance of CVehicle.
|
||||
If the first argument is a number, it will attempt to spawn a vehicle from the database with a matching id.
|
||||
|
||||
```lua
|
||||
@@ -43,8 +43,9 @@ if vehicleId then
|
||||
end
|
||||
```
|
||||
|
||||
If the first argument is a table and the owner property is a number, or nil, the vehicle will be added to the database.
|
||||
If the first argument is a table and the owner property is a number, or nil, the vehicle will be added to the database.
|
||||
Setting the owner as false creates a non-persistent vehicle.
|
||||
|
||||
```lua
|
||||
local vehicle = Ox.CreateVehicle({
|
||||
model = 'sultanrs',
|
||||
|
||||
@@ -86,7 +86,7 @@ vehicle.setGroup(group)
|
||||
|
||||
## vehicle.setPlate
|
||||
|
||||
Sets the vehicle's plate, used in the database to ensure uniqueness. Does not necessarily match the plate property (i.e. fake plates).
|
||||
Sets the vehicle's plate, used in the database to ensure uniqueness. Does not necessarily match the plate property (i.e. fake plates).
|
||||
Plate is always formatted to 8 characters.
|
||||
|
||||
```lua
|
||||
|
||||
Reference in new issue
Block a user