Skip to content

Commit

Permalink
add salary
Browse files Browse the repository at this point in the history
  • Loading branch information
negrifelipe committed Oct 12, 2023
1 parent d92a69e commit 4533f48
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ If you have any questions, want to recommend features, or need some support, [jo
<img src="/assets/images/plugins/economy/logo.png" width="30" style="vertical-align: bottom;margin-right: 0.25em; border-radius: 50%"/> [Economy](/plugins/economy/) -
Unturned economy plugin that supports xp and balance.

<img src="/assets/images/plugins/salary/logo.png" width="30" style="vertical-align: bottom;margin-right: 0.25em; border-radius: 50%"/> [Salary](/plugins/salary/) -
Easy to use openmod salary plugin.

<img src="/assets/images/plugins/country-restrictor/logo.png" width="30" style="vertical-align: bottom;margin-right: 0.25em; border-radius: 50%"/> [Country Restrictor](/plugins/country-restrictor/) -
Restrict server access based on player countries.

Expand Down
70 changes: 70 additions & 0 deletions docs/plugins/salary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Salary

Platforms: **OpenMod**
Price: **FREE**
**[Download for Free](https://docs.fplugins.com/plugins/salary/#installation)**

**Easy to use salary plugin for openmod**

---

## Explanation of the salary task

In this example:
- We set the name to Universal Salary this must be unique to identify the salary
- The schedule uses crontab to set the time. Check [this site](http://crontab.guru/) for more info
- The task must be set to `salary`. This is important.
- The arguments must contain an amount, roleId and online. This is self explanatory
- Optionally you can include a message that will be sent to players
- The arg `online` is used to specify for who the salary will be rewarded. Use `true` to only reward online players and `false` to reward online and offline players

```yml
- name: Universal Salary
schedule: '*/1 * * * *' # every minute
task: salary
args:
amount: 1000
roleId: 'default'
online: true
message: 'You recieved 1000 as universal salary'
enabled: true
```
## Salaries Set Up
1. Go to the openmod directory and open a file called `autoexec.yaml`
2. As an extra I would recommend you to read this openmod docs to learn how this file works. [Click here](https://openmod.github.io/openmod-docs/userdoc/concepts/jobs.html)
3. Go to the bottom of the file and add a new job with the salary task.
4. Here are some examples:
```yaml
- name: Universal Salary
schedule: '*/1 * * * *' # every minute
task: salary
args:
amount: 1000
roleId: 'default'
online: true
message: 'You recieved 1000 as universal salary'
enabled: true
- name: VIP Salary
schedule: '0 0 * * *' # At 0 am
task: salary
args:
amount: 10000
roleId: 'vip'
online: false
message: "You recieved 10000 as vip salary"
enabled: true
- name: Admin Salary
schedule: '*/5 * * * *' # every 5 minutes
task: salary
args:
amount: 10000
roleId: 'admin'
online: true
enabled: true
```

## Installation

Execute `openmod install Feli.SalaryPlugin`
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ nav:
- Home: index.md
- Free Plugins:
- Economy: plugins/economy.md
- Salary: plugins/salary.md
- Country Restrictor: plugins/country-restrictor.md
- Paid Plugins:
- Stats System: plugins/stats-system.md
Expand Down

0 comments on commit 4533f48

Please sign in to comment.