This plugin does 3 different forms of knife mugging.
- 1: Hard cash value
- Always takes either the value set or as much money as the victim has and gives to killer
- 2: Percentage
- Take a percentage of the victim's cash and gives it to the killer
- 3: Active Mugging/Damage Mugging
- This will take a certain percentage of the victims money dependant on the damage that the attacker does. (Does not necessarily have to kill)
- 01-20 Damage: 25% (1/4)
- 21-99 Damage: 33% (1/3)
- 100 > Damage: 50% (1/2)
- 0 = Off
- 1 = Hard Cash (km_mugcash value)
- 2 = Percentage on Death (km_mugpercent value)
- 3 = Percentage on Damage
- Sets the cash for knife mugging
- Default Values: Anywhere from 1 to 16000
- Sets the amount of money taken in a mugging based on percent
- MUST BE A DECIMAL VALUE. I personally suggest 0.33
- Default Values: 0.0 to 1.0
- Rewrite to optimize code a bit and make easier to manage
- Removed sm_damagemugging (replaced with km_enable 3)
- Replaced sm_mugcash with km_mugcash
- Replaced sm_mugpercent with km_mugpercent
- Fixed version cvar. km_version
- Added km_version cvar
- Added translations file
- Change FloatRound to RoundFloat to keep with consistency.
- Fixed a potential bug that could sometimes cause crashes
- Added a console based output for all mugs
- Fixed a bug that prevented the plugin from working sometimes when dealing with player_hurt.
- Now uses new native GetClientOfUserId instead of FindEntity function.
- Made code smaller (used a smaller font) - joke...LAUGH! (thank you to whoever's setinfo this is on irc and bailopan for saying it
- Step 1:
- Click "Get Plugin" at the bottom of the post and save to your addons\sourcemod\plugins directory
- Step 2:
- Download the "plugin.knifemug.txt" file and put it into your addons\sourcemod\translations directory
Thank you to everyone who helped out on this
. I could list, but you know who you are.
And of course thanks to BAILOPAN, DamagedSoul, and the rest of the SourceMod dev team for working out a few snags I hit.
Thank you to SteamFriends
for allowing me to test this on their servers.
Oh yeah, thanks to mattie for the original knife mugging concept (sorry man, I just don't like eventscripts)