Skip to content

Commit b0463cc

Browse files
committed
ox_target global options
1 parent 28caab7 commit b0463cc

File tree

2 files changed

+33
-13
lines changed

2 files changed

+33
-13
lines changed

pages/ox_target/Functions/Client.mdx

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,26 @@ exports.ox_target:disableTargeting(state)
1515
- state: `boolean`
1616
- Setting `state` to `true` will turn off the targeting eye if it is active and prevent it from reopening until `state` is set to `false` again.
1717

18+
## addGlobalOption
19+
20+
Creates new targetable options which are displayed at all times.
21+
22+
```lua
23+
exports.ox_target:addGlobalOption(options)
24+
```
25+
26+
- options: `TargetOptions`
27+
28+
## removeGlobalOption
29+
30+
Removes all options from the global options list with the option names.
31+
32+
```lua
33+
exports.ox_target:removeGlobalOption(optionNames)
34+
```
35+
36+
- optionNames: `string` or `string[]`
37+
1838
## addGlobalObject
1939

2040
Creates new targetable options for all Object entity types.
@@ -23,7 +43,7 @@ Creates new targetable options for all Object entity types.
2343
exports.ox_target:addGlobalObject(options)
2444
```
2545

26-
- options: `table`
46+
- options: `TargetOptions`
2747

2848
## removeGlobalObject
2949

@@ -43,7 +63,7 @@ Creates new targetable options for all Ped entity types (excluding players).
4363
exports.ox_target:addGlobalPed(options)
4464
```
4565

46-
- options: `table`
66+
- options: `TargetOptions`
4767

4868
## removeGlobalPed
4969

@@ -63,7 +83,7 @@ Creates new targetable options for all Player entities.
6383
exports.ox_target:addGlobalPlayer(options)
6484
```
6585

66-
- options: `table`
86+
- options: `TargetOptions`
6787

6888
## removeGlobalPlayer
6989

@@ -83,7 +103,7 @@ Creates new targetable options for all Vehicle entity types.
83103
exports.ox_target:addGlobalVehicle(options)
84104
```
85105

86-
- options: `table`
106+
- options: `TargetOptions`
87107

88108
## removeGlobalVehicle
89109

@@ -104,7 +124,7 @@ exports.ox_target:addModel(models, options)
104124
```
105125

106126
- models: `number` or `string` or `Array<number | string>`
107-
- options: `table`
127+
- options: `TargetOptions`
108128

109129
## removeModel
110130

@@ -126,7 +146,7 @@ exports.ox_target:addEntity(netIds, options)
126146
```
127147

128148
- netIds: `number` or `number[]`
129-
- options: `table`
149+
- options: `TargetOptions`
130150

131151
## removeEntity
132152

@@ -148,7 +168,7 @@ exports.ox_target:addLocalEntity(entities, options)
148168
```
149169

150170
- entities: `number` or `number[]`
151-
- options: `table`
171+
- options: `TargetOptions`
152172

153173
## removeLocalEntity
154174

@@ -174,7 +194,7 @@ exports.ox_target:addSphereZone(parameters)
174194
- radius?: `number`
175195
- debug?: `boolean`
176196
- drawSprite?: `boolean`
177-
- options: `table`
197+
- options: `TargetOptions`
178198

179199
Return:
180200
- id: `number`
@@ -193,7 +213,7 @@ exports.ox_target:addBoxZone(parameters)
193213
- rotation?: `number`
194214
- debug?: `boolean`
195215
- drawSprite?: `boolean`
196-
- options: `table`
216+
- options: `TargetOptions`
197217

198218
Return:
199219
- id: `number`
@@ -212,7 +232,7 @@ exports.ox_target:addPolyZone(parameters)
212232
- thickness?: `number`
213233
- debug?: `boolean`
214234
- drawSprite?: `boolean`
215-
- options: `table`
235+
- options: `TargetOptions`
216236

217237
Return:
218238
- id: `number`

pages/ox_target/Options.mdx renamed to pages/ox_target/TargetOptions.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Options
1+
# TargetOptions
22

3-
When creating a targetable option you must send an array of options with the following properties.
3+
All target actions are formated as an array containing objects with the following properties.
44

5-
## Option Parameters
5+
## TargetOption
66

77
- label: `string`
88
- name?: `string`

0 commit comments

Comments
 (0)