Raised This Month: $208 Target: $400
 52% 

[BOTH] Streaker (Increase killstreak count)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SHADoW NiNE TR3S
AlliedModders Donor
Join Date: Jul 2014
Location: Nepu Nepu?
Old 05-22-2015 , 01:03   [BOTH] Streaker (Increase killstreak count)
Reply With Quote #1

Pretty much self-explanatory.

When a player has at least 1 killstreak-enabled weapon equipped, for every X or greater amount of damage dealt to the boss, it will increase the player's current killstreak by a specified amount (provided they are not a boss or a boss's companion/minion), regardless whether the active weapon is a killstreak weapon or not.

Works with both VSH and FF2.

In-game Screenshot:


Dependencies:
  • Requires SM 1.7.x or later

Convars:
  • streaker_version: Plugin version (Current version: 1.0)
  • streaker_updater: Updater support? 1=Enable, 0=Disable (default: 0)
  • streaker_kstreak_dmg: MINIMUM damage to increase killstreak count (default: 200)
  • streaker_kstreak: Amount of killstreaks given (default: 1)

OPTIONAL:
  • updater.inc if you want to compile with updater support
Attached Files
File Type: smx streaker.smx (6.5 KB, 304 views)
File Type: sp Get Plugin or Get Source (streaker.sp - 470 views - 3.8 KB)
__________________

Last edited by SHADoW NiNE TR3S; 05-22-2015 at 01:39.
SHADoW NiNE TR3S is offline
Send a message via AIM to SHADoW NiNE TR3S Send a message via Skype™ to SHADoW NiNE TR3S
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 05-22-2015 , 10:43   Re: [BOTH] Streaker (Increase killstreak count)
Reply With Quote #2

Make an option to only update killstreaks whenever one passes intervals of 5 kills.
__________________
Chdata is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 05-22-2015 , 11:27   Re: [BOTH] Streaker (Increase killstreak count)
Reply With Quote #3

You'll probably want this block to do detection for VSH/FF2 on startup:

PHP Code:
public void OnAllPluginsLoaded()
{
    
#if defined _updater_included
    
if (LibraryExists("updater") && GetConVarBool(cvarUpdater))
    {
        
Updater_AddPlugin(UPDATE_URL);
    }
    
#endif
    
    #if defined _VSH_included
    
if (LibraryExists("saxtonhale"))
    {
        
isVSH=true;
    }
    
#endif
    
    #if defined _FF2_included
    
if (LibraryExists("freak_fortress_2"))
    {
        
isFF2=true;
    }
    
#endif

Edit: Although now that I think about it, that's not going to work for the updater check as this would be called before cvars are set from config files... might have to add in a new bool and do this check the first time OnConfigsExecuted is called.

Quote:
Originally Posted by Chdata View Post
Make an option to only update killstreaks whenever one passes intervals of 5 kills.
You're aware that this plugin only works for non-bosses, right?
__________________
Am I back? Well, we'll see.

Last edited by Powerlord; 05-22-2015 at 11:29.
Powerlord is offline
sarysa
Senior Member
Join Date: Mar 2014
Old 05-22-2015 , 14:13   Re: [BOTH] Streaker (Increase killstreak count)
Reply With Quote #4

Nice. Have you figured out a workaround for the spy problem? Since actual spy damage in OnTakeDamagePost() is inaccurate, at least with FF2.
__________________
sarysa is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 05-23-2015 , 06:09   Re: [BOTH] Streaker (Increase killstreak count)
Reply With Quote #5

Quote:
Originally Posted by Powerlord View Post
You're aware that this plugin only works for non-bosses, right?
Yes. What does that have to do with anything? It converts damage to kills.

I just realized though, this plugin probably doesn't create event_player_death to show the actual killstreak notifications in the upper right / middle of the screen (for every 5 kills).

Quote:
Originally Posted by sarysa View Post
Nice. Have you figured out a workaround for the spy problem? Since actual spy damage in OnTakeDamagePost() is inaccurate, at least with FF2.
You should always be able to grab whatever damage a spy actual deals either by player_hurt or.. . ....... ... place whatever code you need that amount for right after you actually calculate the spy's damage formula.

PHP Code:
            if (iDmgCustom == TF_CUSTOM_BACKSTAB)
            {
                    new 
Float:flHaleHealthMax float(HaleHealthMax);
                    
flDamage = ( BackstabCalculate(flHaleHealthMax) )/3.0;
                    
iDmgType |= DMG_CRIT|DMG_PREVENT_PHYSICS_FORCE;
                    
                    
SpyBackstabCallback(iVictimiAtkerflDamage*3.0); // Since this is OnTakeDamage (pre) the crit gets applied later.
            

__________________

Last edited by Chdata; 05-23-2015 at 06:15.
Chdata 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 08:18.


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