Jump to content
  • 0

Making Players Lose Money On Death


Nova_Soup

Question

Hello everyone! Recently, I started a server for me and my friends to play on. I decided I wanted a player to lose half of their money on death. I'm using Essentials, Vault, and KillerMoney. I know the command in-game is /eco take (player name) 50%. But I don't know how to make it do this every time a player dies. Do I have to edit the config file, use command blocks, or what? I don't care which way you suggest, so I'll be taking anything.

TL;DR: I am using Essentials, KillerMoney, and Vault. I want a way for players to lose 50% of money on death.

Thanks in advance!


Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0
2 minutes ago, Nova_Soup said:

@_Tarna_Sorry if this is asking for too much (which it probably isnt lol), but could you remake it so it will say to the player who died something like "you lost half you your coins"? Otherwise, it works perfectly!

Thanks!

Hey sure no problem. All I would need to add is one send statement. 

on death of player:
	set victim's balance to victim's balance / 2
	send "you lost half you your coins" to victim 

You can change the message or even add color codes to it to make it colored if you want. 

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

  • 0

If you use a plugin called Skript, you can easily do that.

First, download the plugin called skript to your server then restart the server. Then go to the folder plugins > skript > scripts. In the scripts folder, make a file called like death.sk, can be really anything but just has to end in .sk. In the file you created, copy and paste the following.

on death of player:
	set victim's balance to victim's balance / 2

This makes it that when a player dies, it sets their balance to what they currently have, divided by 2. Which removes half of their money. I have not tested this but it should work. After adding that to the created file, do /sk reload death, or what ever you named the file instead of death. The skript should not be working. 

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...