[TF2] UberSteal
1 Attachment(s)
[TF2] UberSteal Description:A fairly simple plugin. If a Medic kills or assists in killing another Medic, he will steal that Medic's Uber. Cvars: sm_ubersteal def. "1.0" Amount of Uber you steal. This is a percent. 2.0 for double, 0.5 for half, etc...sm_uberoverload def. "0" Allow Uberstealing past 100% Ubercharge.ubersteal_version def. "1.2" Current version running. Do not try to alter this. It's merely used for tracking.Changelog: v1.0: -Initial Release v1.1: -Changed sm_ubersteal to a Float multiplier v1.2: -Added sm_uberoverload to allow stealing Uber past 100% v1.2.3http://forums.alliedmods.net/images/...n/post_old.gif: (by Thraka) -Accounted for Valve removing charge data in player_death by caching it in player_hurt. |
Re: [TF2] UberSteal
You have an issue on line 39. Getting the players class twice which would prevent the "stealer" code from ever being run.
Second. That hook should not have ACTION: in it. Other than that, it looks good. Should try to be consistent with your coding, you use if == with brackets up top, then if != return below, but thats just being anal. |
Re: [TF2] UberSteal
Whoops, didn't notice I forgot to change victim to stealer.
Thanks for pointing it out. It's those idiotic mistakes that always neck me. And my brackets vs. no brackets policy is the general one: Use them if you need them. A single line of code doesn't really warrant brackets for me. Edit: No idea how the Action snuck in there. I think I was going to write a command first, but then reaslised I didn't need one. Should work no less with it, though. |
Re: [TF2] UberSteal
Quote:
So for 50% you'll have to set your cvar to 0.5. For 33% to 0.33 Disable = 0.0 and so on. |
Re: [TF2] UberSteal
1 Attachment(s)
Made it a float. Hope it works. Cant test.
|
Re: [TF2] UberSteal
The guy requesting it just wanted 100% steal. I added the 50% so there is at least something extra.
But yeah, it's just changing a tag and a few functioncalls. I'll make it like this "sm_ubersteal", "1.0","Amount of Uber you steal. This is a percent. 2.0 for double, 0.5 for half, etc..." |
Re: [TF2] UberSteal
Just like mine except i renamed hEnabled to hFactor to match the new use of the Convar (and its Handle) :P
Nice Plugin btw :) |
Re: [TF2] UberSteal
Quote:
|
Re: [TF2] UberSteal
:P For me it was 4 lines ^^
|
Re: [TF2] UberSteal
Allowing the stolen charge to make the stealing medic's ubercharge go over 100% could be cvar configurable.
|
All times are GMT -4. The time now is 09:08. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.