Raised This Month: $100 Target: $400
 25% 

KD Money - *UPDATE* v 0.5


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay        Approver:   v3x (159)
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 05-24-2006 , 08:00   KD Money - *UPDATE* v 0.5
Reply With Quote #1

This plugin give's players money by victim's or killer's KD ratio when killing him/her.

They don't get money when:
1. killing themself's
2. killing teammate

The method is: KD ratio * sv_reward.

Idea
I got the idea from a pack to Mattie's Event plugin( CSS plugin ), there you got money by killing someone. but you also got when you killed yourself/teammate

Cvars
sv_reward(Def: 500) - this is how much they get(* their KD ratio)
kdmoney_enabled(Def: 1) - if 0: disabled, if 1: enabled
kdmoney_usehud(Def: 1) - 0: Uses chat - 1: Uses HUD
kdmoney_kduse(Def: 0) - 0: Uses Victim's K : D - 1: Uses Killer's K : D

Example
  1. player A kills player B.
  2. player B has a K : D ratio of 1.00, and sv_reward is 1000, and kdmoney_kduse is 0
  3. then would player A get 1000 $

I hope you enjoy this plugin and all idea's are welcome ;)

UPDATE 06-06-10, fixed strange error when killed had more then 1 kills and no deaths, the plugin got strange and removed all money.
Added Cvar

fixed the 'def money reward' (thx Throstur)

UPDATE 05-08-2006:
  • Added HUD
  • Now you can choose to use Victim's or Killer's K : D
Attached Files
File Type: sma Get Plugin or Get Source (kdmoney.sma - 1701 views - 2.2 KB)

Last edited by Deviance; 04-23-2007 at 16:09.
Deviance is offline
diamond-optic
Veteran Member
Join Date: May 2005
Location: Upstate New York
Old 05-24-2006 , 11:01  
Reply With Quote #2

you shouldnt list it as "all" for modification

Quote:
#include <cstrike>
you should list it as counter-strike.....
__________________
diamond-optic is offline
Send a message via AIM to diamond-optic
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 05-24-2006 , 11:02  
Reply With Quote #3

Quote:
Originally Posted by diamond-optic
you shouldnt list it as "all" for modification

Quote:
#include <cstrike>
you should list it as counter-strike.....
lol, i thougt i did

changed, thx
Deviance is offline
SubStream
Veteran Member
Join Date: Aug 2005
Location: USA
Old 06-10-2006 , 08:56  
Reply With Quote #4

Great plugin this could be really useful when you have one player who is really really good and you don't want to keep giving him lots of money. It kind of levels the playing field a bit. I like it.
SubStream is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 06-10-2006 , 12:59  
Reply With Quote #5

Code:
    new g_Killer = read_data(1)     new g_Victim = read_data(2)     new team[2];     team[0] == get_user_team(g_Killer);     team[1] == get_user_team(g_Victim);     if( g_Killer == g_Victim || team[0] == team[1] )         return PLUGIN_CONTINUE;
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 06-10-2006 , 15:02  
Reply With Quote #6

shit! this is my old code! omfg!

lol give me a min to upload my new one, zomg

*EDIT* should be right now
*EDIT2* had 2 version's of this plugin, most have switched them, somehow
*EDIT3* <3 you v3x, thx for approval *hugs v3x*
Deviance is offline
Throstur
Senior Member
Join Date: Nov 2004
Location: Iceland
Old 06-11-2006 , 10:37  
Reply With Quote #7

you have to take away 300 for the default money award
Throstur is offline
Send a message via AIM to Throstur Send a message via MSN to Throstur
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 06-11-2006 , 11:48  
Reply With Quote #8

Quote:
Originally Posted by Throstur
you have to take away 300 for the default money award
you gonna tell me how to do it?

sry, i dont know how, gonna look it over
Deviance is offline
Throstur
Senior Member
Join Date: Nov 2004
Location: Iceland
Old 06-11-2006 , 13:00  
Reply With Quote #9

this is just an example but I would have something like:

Code:
cs_set_user_money(id, cs_get_user_money(id) + kdratio - 300);

but then you have to make a kdmoney as the KD ratio.
Throstur is offline
Send a message via AIM to Throstur Send a message via MSN to Throstur
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 06-11-2006 , 13:06  
Reply With Quote #10

Quote:
Originally Posted by Throstur
this is just an example but I would have something like:

Code:
cs_set_user_money(id, cs_get_user_money(id) + kdratio - 300);

but then you have to make a kdmoney as the KD ratio.
there should be someway to block it...

thx for pointing it out, i use your method atm ;)
Deviance is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:39.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode