mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-01 14:38:50 +00:00
update ox_core player methods
This commit is contained in:
1 parent
13c0e9a40e
commit
c3e5018602
1 file changed
+63
@@ -120,6 +120,48 @@ player.setGroup(group, grade);
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## player.getGroup
|
||||
|
||||
Returns the player's current grade for a given group.
|
||||
|
||||
<Tabs>
|
||||
<TabItem value='lua' label='Lua'>
|
||||
|
||||
```lua
|
||||
local grade = player.getGroup()
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value='js/ts' label='JS/TS'>
|
||||
|
||||
```ts
|
||||
const grade = player.getGroup();
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## player.getGroup
|
||||
|
||||
Returns an object of all groups the player is in, with the current grade as the value.
|
||||
|
||||
<Tabs>
|
||||
<TabItem value='lua' label='Lua'>
|
||||
|
||||
```lua
|
||||
local groups = player.getGroups()
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value='js/ts' label='JS/TS'>
|
||||
|
||||
```ts
|
||||
const groups = player.getGroups();
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## player.hasGroup
|
||||
|
||||
Check if the player is a member of a given group, and returns the matching group name and grade.
|
||||
@@ -144,6 +186,27 @@ const [group, grade] = player.hasGroup(filter);
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## player.getPlayersInScope
|
||||
|
||||
Return an array of all player id's inside the player's scope.
|
||||
|
||||
<Tabs>
|
||||
<TabItem value='lua' label='Lua'>
|
||||
|
||||
```lua
|
||||
local inScope = player.getPlayersInScope()
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value='js/ts' label='JS/TS'>
|
||||
|
||||
```ts
|
||||
const inScope = player.getPlayersInScope();
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## player.isPlayerInScope
|
||||
|
||||
Check if the given source is inside the player's scope.
|
||||
|
||||
Reference in new issue
Block a user