-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add new exports and player functions (#3)
- Loading branch information
Showing
6 changed files
with
204 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"functions": "Functions", | ||
"events": "Events", | ||
"import": "Import" | ||
"import": "Import", | ||
"player": "Player" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
import { Callout } from "nextra/components"; | ||
|
||
# Player | ||
```lua | ||
---@field Functions table | ||
---@field PlayerData table | ||
---@field Offline boolean | ||
``` | ||
|
||
## Functions | ||
|
||
<Callout type="info"> | ||
called using `player.Functions.<FunctionName>` | ||
</Callout> | ||
|
||
### SetJob | ||
```lua | ||
---@param job string name | ||
---@param grade integer | ||
---@return boolean success if job was set | ||
``` | ||
|
||
### SetGang | ||
```lua | ||
---@param gang string name | ||
---@param grade integer | ||
---@return boolean success if gang was set | ||
``` | ||
|
||
### SetJobDuty | ||
```lua | ||
---@param onDuty boolean | ||
``` | ||
|
||
### SetPlayerData | ||
Overwrites a top level key of playerdata with the specified value. | ||
|
||
```lua | ||
---@param key string | ||
---@param val any | ||
``` | ||
|
||
### SetMetaData | ||
Stores a key value pair | ||
|
||
```lua | ||
---@param meta string | ||
---@param val any | ||
``` | ||
|
||
### GetMetaData | ||
Retrieves value in metadata given a key | ||
|
||
```lua | ||
---@param meta string | ||
---@return any | ||
``` | ||
|
||
### AddJobReputation | ||
```lua | ||
---@param amount number | ||
``` | ||
|
||
### AddMoney | ||
```lua | ||
---@param moneytype MoneyType | ||
---@param amount number | ||
---@param reason? string | ||
---@return boolean success if money was added | ||
``` | ||
|
||
### RemoveMoney | ||
```lua | ||
---@param moneytype MoneyType | ||
---@param amount number | ||
---@param reason? string | ||
---@return boolean success if money was removed | ||
``` | ||
|
||
### SetMoney | ||
```lua | ||
---@param moneytype MoneyType | ||
---@param amount number | ||
---@param reason? string | ||
---@return boolean success if money was set | ||
``` | ||
|
||
### GetMoney | ||
```lua | ||
---@param moneytype MoneyType | ||
---@return boolean | number amount or false if moneytype does not exist | ||
``` | ||
|
||
### SetCreditCard | ||
Sets owned credit card number. Does not give character any items. | ||
|
||
```lua | ||
---@param cardNumber number | ||
``` | ||
|
||
### Save | ||
Saves character to database |