AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=43)
-   -   Killstreak with shmod (https://forums.alliedmods.net/showthread.php?t=122114)

The Art of War 03-23-2010 06:08

Killstreak with shmod
 
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

Fr33m@n 03-23-2010 08:45

Re: Killstreak with shmod
 
sh_client_death

Works with sh_extra_damage (extradamage, lasers, blast etc.)

The Art of War 03-23-2010 11:02

Re: Killstreak with shmod
 
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?

kanatzu 03-23-2010 14:17

Re: Killstreak with shmod
 
Quote:

Originally Posted by The Art of War (Post 1126452)
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! :grrr:

Jelle 03-23-2010 14:29

Re: Killstreak with shmod
 
Quote:

Originally Posted by The Art of War (Post 1126452)
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.

The Art of War 03-23-2010 15:19

Re: Killstreak with shmod
 
Sorry. No Vik, its for Kim Ill Song :D

Fr33m@n 03-23-2010 15:21

Re: Killstreak with shmod
 
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
    
}



The Art of War 03-24-2010 05:04

Re: Killstreak with shmod
 
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.

Jelle 03-24-2010 08:37

Re: Killstreak with shmod
 
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.

The Art of War 03-24-2010 08:48

Re: Killstreak with shmod
 
Hmm, its my idea! :D:D

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 -.-


All times are GMT -4. The time now is 16:59.

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