Thread: Hit Rewards
View Single Post
Plugin Info:     Modification:          Category:          Approver:   EKS (166)
MistaGee
Senior Member
Join Date: Aug 2004
Location: Germany (Fulda)
Old 08-03-2005 , 10:23   Hit Rewards
Reply With Quote #1

This plugin rewards people for hitting their enemies by giving them a certain amount of money, but if they hit ppl in their own team, the same amount of money will be taken away.

It is able to send HUD messages to the attacker and the victim. A wide variety of cvars allows you to configure the script and a dictionary in English and German languages is included.


CVars:
Code:
amx_hrwd_head          <-- Reward given for a head shot
amx_hrwd_chest         <-- reward for chest
amx_hrwd_stomach       <-- guess what? :p
amx_hrwd_arm_l
amx_hrwd_arm_r
amx_hrwd_leg_l
amx_hrwd_leg_r
amx_hrwd_enable        <-- enables / disables the script
amx_hrwd_dmgfactor     <-- takes damage into account when > 0.0 -- reward will be multiplied this factor and the given damage (use carefully, makes reward grow very fast - 0.05 is maximum I recommend...)
amx_hrwd_maxreward     <-- maximum reward given
amx_hrwd_msg_k         <-- send HUDmsg to killer <0|1>
amx_hrwd_msg_v         <-- send HUDmsg to victim <0|1>
amx_hrwd_msg_onlyonrwd <-- send hud msg only if reward > 0
the HUD msg displays the given damage, if this was a TA, who hit whom, where the victim was hit and how much the killler was rewarded. the victim will see the weapon used as well.

Idea, Coding & Testing by MistaGee with a li'l help from http://forums.alliedmods.net/showthr...=135415#140128

UPDATE
I notived that the plugin made ppl become rich in no time, so I decided to add two cvars:
amx_hrwd_mindistance <0|n>
amx_hrwd_tamaxdistance <-1|0|n>
These define which distance between attacker and victim is needed for normal kills to be counted. If set to 0, no distance is needed, if set to n, distance must be greater than n for the hit to be rewarded.
With ta, this is the other way round: Hitting a team member occurs more easily if the player is far away, so I decided to build in a tamaxdistance cvar. If this is set to 0, distance is not nregarded at all; if set to n, distance must be smaller than n; if set to -1, the script uses the value from mindistance cvar.

Plz download the dictionary as well cuz I changed it too (removed some obsolete information and typos), so there willl be a tag mismatch if you continue using the old one...
Attached Files
File Type: txt hitreward.txt (839 Bytes, 3254 views)
File Type: sma Get Plugin or Get Source (hitreward.sma - 5282 views - 7.0 KB)
__________________
Ich hab nie behauptet dass ich kein Genie bin!
Mumble-Django: A web interface for Mumble
MistaGee is offline
Send a message via ICQ to MistaGee