Raised This Month: $ Target: $400
 0% 

Killstreak with shmod


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
The Art of War
Veteran Member
Join Date: Dec 2009
Location: Sweden Rock Festival
Old 03-23-2010 , 06:08   Killstreak with shmod
Reply With Quote #1

hey all, is it possible to register a killstreak count so the player needs x amount of kills in a row to use power? Like in the Ultimate Killstreak plugin perhaps? Or is it not possible to use that way with superheromod? Thx
__________________
The Art of War is offline
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 03-23-2010 , 08:45   Re: Killstreak with shmod
Reply With Quote #2

sh_client_death

Works with sh_extra_damage (extradamage, lasers, blast etc.)
Fr33m@n is offline
The Art of War
Veteran Member
Join Date: Dec 2009
Location: Sweden Rock Festival
Old 03-23-2010 , 11:02   Re: Killstreak with shmod
Reply With Quote #3

Please be a bit more descriptive -.- So if I want to set so you cant use a power , I add something that has to do with sh_client_death in all the other "if"'s?
__________________
The Art of War is offline
kanatzu
Veteran Member
Join Date: Oct 2007
Location: Sweden
Old 03-23-2010 , 14:17   Re: Killstreak with shmod
Reply With Quote #4

Quote:
Originally Posted by The Art of War View Post
Please be a bit more descriptive -.- So if I want to set so you cant use a power , I add something that has to do with sh_client_death in all the other "if"'s?

If you really want such thing done.

You can request such plugin instead of the help of making one!
__________________




Quote:
Originally Posted by wrecked_ View Post
Stop saying words before I sodomize you with a cucumber.
kanatzu is offline
Send a message via MSN to kanatzu
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 03-23-2010 , 14:29   Re: Killstreak with shmod
Reply With Quote #5

Quote:
Originally Posted by The Art of War View Post
Please be a bit more descriptive -.- So if I want to set so you cant use a power , I add something that has to do with sh_client_death in all the other "if"'s?
Look at superheromod include file to see what sh_client_death does, and how to use it.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
The Art of War
Veteran Member
Join Date: Dec 2009
Location: Sweden Rock Festival
Old 03-23-2010 , 15:19   Re: Killstreak with shmod
Reply With Quote #6

Sorry. No Vik, its for Kim Ill Song
__________________
The Art of War is offline
Fr33m@n
Veteran Member
Join Date: May 2008
Location: France Marne
Old 03-23-2010 , 15:21   Re: Killstreak with shmod
Reply With Quote #7

This kind of thing

PHP Code:
new bool:gHasHero[SH_MAXSLOTS+1]
new 
gCount[SH_MAXSLOTS+1]
 
...
 
public 
plugin_init()
{
    ...
}
public 
sh_client_death(victimattacker)
{
    new 
maxplayers sh_maxplayers()
    if ( 
victim || victim maxplayers || attacker || attacker maxplayers ) return
    
//attacker part
    
if ( gHasHero[attacker] ) {
        
//++ mean add +1 to this var for this player
        
gCount[attacker]++
        if ( 
gCount[attacker] == 10 ) {
            
// emit your sound for 10 kill
        
}
        if ( 
gCount[attacker] == get_pcvar_num(gPcvarUltraKill) {
            
// emit your sound for pcvar num kill
        
}
    }
    
//victim part
    
if ( gHasHero[victim] ) {
        
// set the victim var to 0
        
gCount[victim] = 0
    
}


Last edited by Fr33m@n; 03-23-2010 at 15:25.
Fr33m@n is offline
The Art of War
Veteran Member
Join Date: Dec 2009
Location: Sweden Rock Festival
Old 03-24-2010 , 05:04   Re: Killstreak with shmod
Reply With Quote #8

So if I set
PHP Code:
gPcvarUltraKill 
To 10, and add gCount to the "if"'s/"return" line, I might be able to make a sh hero that returns as usual, but also returns if kills in a row(killstreak without dying) is 10? Awesome for the quick answer Fr33! I did look at sh_client_death but it didnt stated anything I got anything out of xD.

Im actually going to use this for a shmod hero check, so ill just remove the sound later if it works -.- Yes, check *if killstreak is "X", otherwise return* style.
__________________

Last edited by The Art of War; 03-24-2010 at 07:11.
The Art of War is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 03-24-2010 , 08:37   Re: Killstreak with shmod
Reply With Quote #9

Write the code you have in mind instead of telling us how you think you can do. I bet none of us understood your last post.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
The Art of War
Veteran Member
Join Date: Dec 2009
Location: Sweden Rock Festival
Old 03-24-2010 , 08:48   Re: Killstreak with shmod
Reply With Quote #10

Hmm, its my idea!

Well, my though was that it should be like a usual hero(custom) but that to use it, you would have to kill X amount of people. So lets just say Cyclops for an example, as the usual power but to fire the laser, you attacker(user) would have to kill X amount of people in a row (killstreak). Get it? xD Cant post the code now as im not at the place where it is, and despite that I havent written much. I still need the killstreak count before I can start making effects/damage -.-
__________________
The Art of War is offline
Reply



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 20:24.


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