AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:S] Drop Money On Death (https://forums.alliedmods.net/showthread.php?t=172684)

TnTSCS 11-24-2011 14:05

[CS:S] Drop Money On Death
 
4 Attachment(s)
This is a remake of this plugin. Since the author (SAMURAI16) is banned and won't be updating that plugin, I fixed it.

DESCRIPTION:
When a player dies, they will drop a percentage of their cash on the ground and a money model will appear near them (see screenshot).

If another player walks over that money, the amount the player dropped will be added to that player's cash and subtracted from the cash of the player who dropped the cash.

There is a max cash cvar you can set (defaulted to 16000) and if a player can only pick up part of the dropped money, then the part they pick up is added to their money (and that part is subtracted from the player's money who dropped it) and the remainder is left on the ground for someone else to pickup.

If no one picks up the money (all or part), the player who dropped it will not lose it, unless you set the plugin to have the player lost the money when they drop it.

You can set players to be immune to dropping money. Grant them Admin flag Custom4, or override the command "no_dropmoneyondeath" to whatever flag you want.
You also have to set the CVar sm_DropMoneyOnDeath_dropimmunity to "1"

CVARS


REQUIREMENTS:
SDKHooks

OPTIONAL:
Updater - if you want the plugin to auto-update when bug fixes or changes are made

CREDITS:
Bacardi for his Healthkit from dead plugin - it helped me a bit

NOTES:
I've tested it (with bots) and all seems to be working as expected. Let me know if you find any anomalies.

Screenshot attached - courtesy of the original posters thread (why reinvent the wheel)

INSTALLATION:
Place the .smx file in your plugins folder
place the .txt file in your translations folder

If you are planning on compiling yourself, you need the colors include, updater include, and sdkhooks include.

CHANGE LOG


If upgrading, make sure you backup your old config file, delete it (or change the name), then let the plugin create a new one for you, since 0.3.7 includes a new and changed CVar

Version 0.3.7 has an updated translation file and new CVars, so backup and delete your old config file and let the plugin create you a new one that you can customize.

For the new CVar sm_DropMoneyOnDeath_advertise, it allows you to add the options you want and set it to the sum of the options you want. IE. if you want option 1 and 4, you would use "5" as the value.

Mata Patos 11-24-2011 19:10

Re: [CS:S] Drop Money On Death
 
Hi TnTSCS,

This plugin contain the cash model?
Like in the image?

TnTSCS 11-24-2011 19:14

Re: [CS:S] Drop Money On Death
 
Yes. It uses an already existing model

Mata Patos 11-24-2011 19:16

Re: [CS:S] Drop Money On Death
 
Thanks, I will try the plugin on my server. :)
Then i tell you if this plugin works good .

Mata Patos 11-24-2011 19:27

Re: [CS:S] Drop Money On Death
 
The plugin works.

Fearts 11-25-2011 13:46

Re: [CS:S] Drop Money On Death
 
Would it be possible to add:

1. Player don't lose cash if someone picks it up

2. Set solid amount instead of % for money drops

TnTSCS 11-25-2011 13:58

Re: [CS:S] Drop Money On Death
 
Sure. You know the player who drops the money doesn't actually lose the money unless someone picks it up. But I'll add a cvar to not make the player lose the money.

Also, with the hard set amount, it doesn't matter if the player who died has the amount the hard amount is set to??

Fearts 11-25-2011 14:06

Re: [CS:S] Drop Money On Death
 
Nope.

What I am trying to do is get rid of all round money and only allow players to earn money from drops.

TnTSCS 11-25-2011 14:17

Re: [CS:S] Drop Money On Death
 
Kk. I'll work on that when I get back. Out braving the black Friday shopping now. LoL

Annihilator 11-25-2011 15:41

Re: [CS:S] Drop Money On Death
 
How about a cvar for announcements, because there's quite a lot of spam in a bigger server :)


All times are GMT -4. The time now is 21:55.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.