mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 14:38:50 +00:00
update skill check docs
This commit is contained in:
1 parent
b47092b02a
commit
c897cc2ff3
1 file changed
+7
-5
@@ -13,7 +13,7 @@ Runs a skill check with the defined difficulty.
|
|||||||
<TabItem value='Lua'>
|
<TabItem value='Lua'>
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
lib.skillCheck(difficulty)
|
lib.skillCheck(difficulty, inputs)
|
||||||
```
|
```
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
@@ -22,7 +22,7 @@ lib.skillCheck(difficulty)
|
|||||||
```ts
|
```ts
|
||||||
import lib from '@overextended/ox_lib/client'
|
import lib from '@overextended/ox_lib/client'
|
||||||
|
|
||||||
lib.skillCheck(difficulty)
|
lib.skillCheck(difficulty, inputs)
|
||||||
```
|
```
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
@@ -36,6 +36,8 @@ lib.skillCheck(difficulty)
|
|||||||
* hard: { areaSize: 25, speedMultiplier: 1.75 }
|
* hard: { areaSize: 25, speedMultiplier: 1.75 }
|
||||||
* `areaSize` size of the area in degrees.
|
* `areaSize` size of the area in degrees.
|
||||||
* Sending an array will chain the checks together and return false if one fails and true if all succeed
|
* Sending an array will chain the checks together and return false if one fails and true if all succeed
|
||||||
|
* inputs: `string[]`
|
||||||
|
* Picks a random key from the inputs table to use on each skill check pass.
|
||||||
|
|
||||||
### Usage Example
|
### Usage Example
|
||||||
|
|
||||||
@@ -43,7 +45,7 @@ lib.skillCheck(difficulty)
|
|||||||
<TabItem value='Lua'>
|
<TabItem value='Lua'>
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
local success = lib.skillCheck({'easy', 'easy', {areaSize = 60, speedMultiplier = 2}, 'hard'})
|
local success = lib.skillCheck({'easy', 'easy', {areaSize = 60, speedMultiplier = 2}, 'hard'}, {'w', 'a', 's', 'd'})
|
||||||
```
|
```
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
@@ -52,10 +54,10 @@ local success = lib.skillCheck({'easy', 'easy', {areaSize = 60, speedMultiplier
|
|||||||
```ts
|
```ts
|
||||||
import lib from '@overextended/ox_lib/client'
|
import lib from '@overextended/ox_lib/client'
|
||||||
|
|
||||||
const success = await lib.skillCheck(['easy', 'easy', {areaSize: 60, speedMultiplier: 2}, 'hard'])
|
const success = await lib.skillCheck(['easy', 'easy', {areaSize: 60, speedMultiplier: 2}, 'hard'], ['w', 'a', 's', 'd'])
|
||||||
```
|
```
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||

|

|
||||||
Reference in new issue
Block a user