Raised This Month: $51 Target: $400
 12% 

Help


Post New Thread Reply   
 
Thread Tools Display Modes
DarkGod
SourceMod DarkCrab
Join Date: Jul 2007
Location: Sweden
Old 03-16-2010 , 12:13   Re: Help
Reply With Quote #11

Remove the first ).
__________________
DarkGod is offline
Send a message via AIM to DarkGod Send a message via MSN to DarkGod
The Art of War
Veteran Member
Join Date: Dec 2009
Location: Sweden Rock Festival
Old 03-16-2010 , 13:29   Re: Help
Reply With Quote #12

Quote:
Originally Posted by DarkGod View Post
Remove the first ).
Remove my first post with old info, or remove
PHP Code:
gHeroID != heroID 
? I removed stated and that error become working. Though I got loads of warning and a lot of errors.
Imma post the whole shit now. You will die when you see it, epic fail I know, but hey, you all started somewhere a the bottom too!

PHP Code:
// DRACULA!
/* CVARS - copy and paste to shconfig.cfg
//Dracula
dracula_level 0
dracula_pctperlev 0.03 //What percent of damage to give back per level of player
*/
// v1.17.5 - JTP - Added code to allow you to regen to your max heatlh
#include <superheromod>
// GLOBAL VARIABLES
new gHeroID
new const gHeroName[] = "Dracula"
new bool:gHasDracula[SH_MAXSLOTS+1]
new 
gPcvarPctPerLevgPcvarMaxDamagegPcvarCooldown
//----------------------------------------------------------------------------------------------
public plugin_init()
{
 
// Plugin Info
 
register_plugin("SUPERHERO Dracula"SH_VERSION_STR"{HOJ} Batman/JTP10181")
 
// DO NOT EDIT THIS FILE TO CHANGE CVARS, USE THE SHCONFIG.CFG
 
new pcvarLevel register_cvar("dracula_level""0")
 
gPcvarPctPerLev register_cvar("dracula_pctperlev""0.03")
 
// FIRE THE EVENT TO CREATE THIS SUPERHERO!
 
gHeroID sh_create_hero(gHeroNamepcvarLevel)
 
sh_set_hero_info(gHeroID"Vampiric Drain""Gain HP by attacking players - More HPs per level")
}
//----------------------------------------------------------------------------------------------
public sh_hero_init(idheroIDmode)
{
 if ( 
gHeroID != heroID ) return
 if ( 
mode == SH_HERO_ADD ) {
  
gPlayerInCooldown[id] = false
 
}
}
//----------------------------------------------------------------------------------------------
public sh_client_spawn(id)
{
 
remove_task(id)
 
gPlayerInCooldown[id] = false
}
//-------------------------------------------
public sh_hero_key(idheroIDkey)
{
   if ( 
sh_is_freezetime() || !is_user_alive(id) || !gHasDracula[id] ) return
    
    if ( 
key == SH_KEYDOWN )
    {
        if ( 
gPlayerInCooldown[id] )
        {
            
sh_sound_deny(id)
            return
        }
        
        new 
Float:seconds get_pcvar_float(gPcvarCooldown)
        
        if (
seconds 0.0 sh_set_cooldown(idseconds)
        
        new 
maxDamage get_pcvar_num(gPcvarMaxDamage)
    }
}  
//----------------------------------------------------------------------------------------------
public client_damage(attackervictimdamagewpnindex)
{
 if ( !
sh_is_active() ) return
 if ( !
is_user_connected(victim) || !is_user_alive(attacker) ) return
 
// Should nades not count? maybe remove them later
 
if ( gHasDracula[attacker] && CSW_P228 <= wpnindex <= CSW_P90 ) {
  
dracula_suckblood(attackerdamage)
 }
}
//----------------------------------------------------------------------------------------------
// Leave this public so it can be called with a forward from Longshot
public dracula_suckblood(attackerdamage)
{
 if ( 
sh_is_active() && gHasDracula[attacker] && is_user_alive(attacker) )
 {
  
// Add some HP back!
  
new giveHPs floatround(damage get_pcvar_float(gPcvarPctPerLev) * sh_get_user_lvl(attacker))
  
// Get this here so it doesn't have to be called in sh_add_hp again
  
new maxHPs sh_get_max_hp(attacker)
  if ( 
get_user_health(attacker) < maxHPs && giveHPs )
  {
   new 
alphanum clamp((damage 2), 40200)
   
sh_screen_fade(attacker0.50.252551010alphanum//Red Screen Flash
   
sh_add_hp(attackergiveHPsmaxHPs)
                }
                
sh_extra_damage(victimattackerdamage"Life drain"0SH_DMG_NORMtruefalse)
  }
 }
}
//----------------------------------------------------------------------------------------------
public client_connect(id)
{
 
gHasDracula[id] = false
}
//---------------------------------------------------------------------------------------------- 
Errors:

PHP Code:
// C:\Users\Cornerstone\Desktop\HLDS_Server\cstrike\addons\amxmodx\scripting\sh_
the_dracula.sma(102) : error 001expected token";"but found ")"
// C:\Users\Cornerstone\Desktop\HLDS_Server\cstrike\addons\amxmodx\scripting\sh_
the_dracula.sma(102) : error 029invalid expressionassumed zero
// C:\Users\Cornerstone\Desktop\HLDS_Server\cstrike\addons\amxmodx\scripting\sh_
the_dracula.sma(102) : fatal error 107too many error messages on one line
// C:\Users\Cornerstone\Desktop\HLDS_Server\cstrike\addons\amxmodx\scripting\sh_
the_dracula.sma(102) : error 017undefined symbol "victim"
// C:\Users\Cornerstone\Desktop\HLDS_Server\cstrike\addons\amxmodx\scripting\sh_ 
Warnings:
PHP Code:
// C:\Users\Cornerstone\Desktop\HLDS_Server\cstrike\addons\amxmodx\scripting\sh_
the_dracula.sma(56) : warning 217loose indentation
// C:\Users\Cornerstone\Desktop\HLDS_Server\cstrike\addons\amxmodx\scripting\sh_
the_dracula.sma(69) : warning 204symbol is assigned a value that is never used
"maxDamage"
// C:\Users\Cornerstone\Desktop\HLDS_Server\cstrike\addons\amxmodx\scripting\sh_
the_dracula.sma(102) : warning 215expression has no effect
// C:\Users\Cornerstone\Desktop\HLDS_Server\cstrike\addons\amxmodx\scripting\sh_
the_dracula.sma(102) : warning 215expression has no effect
// C:\Users\Cornerstone\Desktop\HLDS_Server\cstrike\addons\amxmodx\scripting\sh_
the_dracula.sma(102) : warning 215expression has no effect
// C:\Users\Cornerstone\Desktop\HLDS_Server\cstrike\addons\amxmodx\scripting\sh_
the_dracula.sma(102) : warning 215expression has no effect
// C:\Users\Cornerstone\Desktop\HLDS_Server\cstrike\addons\amxmodx\scripting\sh_
the_dracula.sma(102) : warning 215expression has no effect
// C:\Users\Cornerstone\Desktop\HLDS_Server\cstrike\addons\amxmodx\scripting\sh_
the_dracula.sma(102) : warning 215expression has no effect
// C:\Users\Cornerstone\Desktop\HLDS_Server\cstrike\addons\amxmodx\scripting\sh_
the_dracula.sma(102) : warning 215expression has no effect 
Have fun and laugh at me lol

I would like to know how to set sh_extra_damage for a attack that does damage to the victim, a sprite from the attacker to the victim. Cuz I guess I dont have to change anything for the life giving stuff right? Then also how to set how much life it drains to 7% of victim max health, get_user_maxHealth/giveHPs = 7%/user_max_health? Probably sound weird, so give me the right way xD. THX!!
__________________
The Art of War is offline
The Art of War
Veteran Member
Join Date: Dec 2009
Location: Sweden Rock Festival
Old 03-16-2010 , 15:12   Re: Help
Reply With Quote #13

Um lol fail
Got it !"working" now

PHP Code:
// DRACULA!
/* CVARS - copy and paste to shconfig.cfg
//Dracula
dracula_level 0
dracula_pctperlev 0.03 //What percent of damage to give back per level of player
*/
// v1.17.5 - JTP - Added code to allow you to regen to your max heatlh
#include <superheromod>
// GLOBAL VARIABLES
new gHeroID
new const gHeroName[] = "Dracula"
new bool:gHasDracula[SH_MAXSLOTS+1]
new 
gPcvarPctPerLevgPcvarMaxDamagegPcvarCooldown
//----------------------------------------------------------------------------------------------
public plugin_init()
{
 
// Plugin Info
 
register_plugin("SUPERHERO Dracula"SH_VERSION_STR"{HOJ} Batman/JTP10181")
 
// DO NOT EDIT THIS FILE TO CHANGE CVARS, USE THE SHCONFIG.CFG
 
new pcvarLevel register_cvar("dracula_level""0")
 
gPcvarPctPerLev register_cvar("dracula_pctperlev""0.03")
 
// FIRE THE EVENT TO CREATE THIS SUPERHERO!
 
gHeroID sh_create_hero(gHeroNamepcvarLevel)
 
sh_set_hero_info(gHeroID"Vampiric Drain""Gain HP by attacking players - More HPs per level")
}
//----------------------------------------------------------------------------------------------
public sh_hero_init(idheroIDmode)
{
 if ( 
gHeroID != heroID ) return
 if ( 
mode == SH_HERO_ADD ) {
  
gPlayerInCooldown[id] = false
 
}
}
//----------------------------------------------------------------------------------------------
public sh_client_spawn(id)
{
 
remove_task(id)
 
gPlayerInCooldown[id] = false
}
//-------------------------------------------
public sh_hero_key(idheroIDkey)
{
   if ( 
sh_is_freezetime() || !is_user_alive(id) || !gHasDracula[id] ) return
    
    if ( 
key == SH_KEYDOWN )
    {
        if ( 
gPlayerInCooldown[id] )
        {
            
sh_sound_deny(id)
            return
        }
        
        new 
Float:seconds get_pcvar_float(gPcvarCooldown)
        
        if (
seconds 0.0 sh_set_cooldown(idseconds)
        
        new 
maxDamage get_pcvar_num(gPcvarMaxDamage)
    }
}  
//----------------------------------------------------------------------------------------------
public client_damage(attackervictimdamagewpnindex)
{
 if ( !
sh_is_active() ) return
 if ( !
is_user_connected(victim) || !is_user_alive(attacker) ) return
 
// Should nades not count? maybe remove them later
 
if ( gHasDracula[attacker] && CSW_P228 <= wpnindex <= CSW_P90 ) {
  
dracula_suckblood(attackerdamage)
 }
}
//----------------------------------------------------------------------------------------------
// Leave this public so it can be called with a forward from Longshot
public dracula_suckblood(attackerdamage)
{
 if ( 
sh_is_active() && gHasDracula[attacker] && is_user_alive(attacker) )
 {
  
// Add some HP back!
  
new giveHPs floatround(damage get_pcvar_float(gPcvarPctPerLev) * sh_get_user_lvl(attacker))
  
// Get this here so it doesn't have to be called in sh_add_hp again
  
new maxHPs sh_get_max_hp(attacker)
  if ( 
get_user_health(attacker) < maxHPs && giveHPs )
  {
   new 
alphanum clamp((damage 2), 40200)
   
sh_screen_fade(attacker0.50.252551010alphanum//Red Screen Flash
   
sh_add_hp(attackergiveHPsmaxHPs)
                }
                
sh_extra_damage(victimattackerdamage"Life drain"0SH_DMG_NORMtruefalse)
  }
 }
}
//----------------------------------------------------------------------------------------------
public client_connect(id)
{
 
gHasDracula[id] = false
}
//---------------------------------------------------------------------------------------------- 
This is the code that compiles. Though it is still automatic lol
__________________
The Art of War is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 03-16-2010 , 15:31   Re: Help
Reply With Quote #14

PHP Code:
public plugin_init()
{
    
sh_set_hero_bind(gHeroID)
}

public 
sh_hero_key(idheroIDkey)
{
    if ( 
gHeroID != heroID ) return
    
    if ( 
sh_is_freezetime() || !is_user_alive(id) || !gHasDracula[id] ) return
    
    if ( 
key == SH_KEYDOWN )
    {
        if ( 
gPlayerInCoolDown[id] )
        {
            
sh_sound_deny(id)
            return
        }
        
        new 
Float:seconds get_pcvar_float(gPcvarCooldown)
        
        if (
seconds 0.0 sh_set_cooldown(idseconds)
    }

Not sure why you have the new maxDamage. But this should work as you want it to.
__________________
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-16-2010 , 15:51   Re: Help
Reply With Quote #15

Errors/warnings:

PHP Code:
//// sh_the_dracula.sma
// C:\Users\Cornerstone\Desktop\HLDS_Server\cstrike\addons\amxmodx\scripting\sh_
the_dracula.sma(105) : error 017undefined symbol "victim"
// C:\Users\Cornerstone\Desktop\HLDS_Server\cstrike\addons\amxmodx\scripting\sh_
the_dracula.sma(105) : warning 215expression has no effect
// C:\Users\Cornerstone\Desktop\HLDS_Server\cstrike\addons\amxmodx\scripting\sh_
the_dracula.sma(105) : warning 215expression has no effect
// C:\Users\Cornerstone\Desktop\HLDS_Server\cstrike\addons\amxmodx\scripting\sh_
the_dracula.sma(105) : warning 215expression has no effect
// C:\Users\Cornerstone\Desktop\HLDS_Server\cstrike\addons\amxmodx\scripting\sh_
the_dracula.sma(105) : warning 215expression has no effect
// C:\Users\Cornerstone\Desktop\HLDS_Server\cstrike\addons\amxmodx\scripting\sh_
the_dracula.sma(105) : warning 215expression has no effect
// C:\Users\Cornerstone\Desktop\HLDS_Server\cstrike\addons\amxmodx\scripting\sh_
the_dracula.sma(105) : warning 215expression has no effect
// C:\Users\Cornerstone\Desktop\HLDS_Server\cstrike\addons\amxmodx\scripting\sh_
the_dracula.sma(105) : warning 215expression has no effect
// C:\Users\Cornerstone\Desktop\HLDS_Server\cstrike\addons\amxmodx\scripting\sh_
the_dracula.sma(105) : error 001expected token";"but found ")"
// C:\Users\Cornerstone\Desktop\HLDS_Server\cstrike\addons\amxmodx\scripting\sh_
the_dracula.sma(105) : error 029invalid expressionassumed zero
// C:\Users\Cornerstone\Desktop\HLDS_Server\cstrike\addons\amxmodx\scripting\sh_
the_dracula.sma(105) : fatal error 107too many error messages on one line 
Code:
PHP Code:
// DRACULA!
/* CVARS - copy and paste to shconfig.cfg
//Dracula
dracula_level 0
dracula_pctperlev 0.03 //What percent of damage to give back per level of player
*/
// v1.17.5 - JTP - Added code to allow you to regen to your max heatlh
#include <superheromod>
// GLOBAL VARIABLES
new gHeroID
new const gHeroName[] = "Dracula"
new bool:gHasDracula[SH_MAXSLOTS+1]
new 
gPcvarPctPerLevgPcvarMaxDamagegPcvarCooldown
//----------------------------------------------------------------------------------------------
public plugin_init()
{
 
// Plugin Info
 
register_plugin("SUPERHERO Dracula"SH_VERSION_STR"{HOJ} Batman/JTP10181")
 
// DO NOT EDIT THIS FILE TO CHANGE CVARS, USE THE SHCONFIG.CFG
 
new pcvarLevel register_cvar("dracula_level""0")
 
gPcvarPctPerLev register_cvar("dracula_pctperlev""0.03")
 
// FIRE THE EVENT TO CREATE THIS SUPERHERO!
 
gHeroID sh_create_hero(gHeroNamepcvarLevel)
 
sh_set_hero_info(gHeroID"Vampiric Drain""Gain HP by attacking players - More HPs per level")
        
sh_set_hero_bind(gHeroID)
}
//----------------------------------------------------------------------------------------------
public sh_hero_init(idheroIDmode)
{
 if ( 
gHeroID != heroID ) return
 if ( 
mode == SH_HERO_ADD ) {
  
gPlayerInCooldown[id] = false
 
}
}
//----------------------------------------------------------------------------------------------
public sh_client_spawn(id)
{
 
remove_task(id)
 
gPlayerInCooldown[id] = false
}
//-------------------------------------------
public sh_hero_key(idheroIDkey)
{
    if ( 
gHeroID != heroID ) return
    
    if ( 
sh_is_freezetime() || !is_user_alive(id) || !gHasDracula[id] ) return
    
    if ( 
key == SH_KEYDOWN )
    {
        if ( 
gPlayerInCooldown[id] )
        {
            
sh_sound_deny(id)
            return
        }
        
        new 
Float:seconds get_pcvar_float(gPcvarCooldown)
        
        if (
seconds 0.0 sh_set_cooldown(idseconds)
    }
}  

//----------------------------------------------------------------------------------------------
public client_damage(attackervictimdamagewpnindex)
{
 if ( !
sh_is_active() ) return
 if ( !
is_user_connected(victim) || !is_user_alive(attacker) ) return
 
// Should nades not count? maybe remove them later
 
if ( gHasDracula[attacker] && CSW_P228 <= wpnindex <= CSW_P90 ) {
  
dracula_suckblood(attackerdamage)
 }
}
//----------------------------------------------------------------------------------------------
// Leave this public so it can be called with a forward from Longshot
public dracula_suckblood(attackerdamage)
{
 if ( 
sh_is_active() && gHasDracula[attacker] && is_user_alive(attacker) )
 {
  
// Add some HP back!
  
new giveHPs floatround(damage get_pcvar_float(gPcvarPctPerLev) * sh_get_user_lvl(attacker))
  
// Get this here so it doesn't have to be called in sh_add_hp again
  
new maxHPs sh_get_max_hp(attacker)
  if ( 
get_user_health(attacker) < maxHPs && giveHPs )
  {
   new 
alphanum clamp((damage 2), 40200)
   
sh_screen_fade(attacker0.50.252551010alphanum//Red Screen Flash
   
sh_add_hp(attackergiveHPsmaxHPs)
                }
                
sh_extra_damage(victimattackerdamage"Life drain"0SH_DMG_NORMtruefalse)
  }
 }
}
//----------------------------------------------------------------------------------------------
public client_connect(id)
{
 
gHasDracula[id] = false
}
//---------------------------------------------------------------------------------------------- 
__________________
The Art of War is offline
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 03-16-2010 , 15:59   Re: Help
Reply With Quote #16

grr I really hate your indentation...

in public client_damage(attacker, victim, damage, wpnindex) change this
PHP Code:
dracula_suckblood(attackerdamage
to

PHP Code:
dracula_suckblood(victimattackerdamage
and take this

PHP Code:
public dracula_suckblood(attackerdamage
and change it to

PHP Code:
public dracula_suckblood(victimattackerdamage
It compiles here but gives me 3 loose indentation warning.

Please, learn to make the indentation right. It is hard to find head and tail in your code.
__________________
No idea what to write here...
Jelle is offline
Send a message via MSN to Jelle
G-Dog
Senior Member
Join Date: Dec 2005
Location: Thunderstorm Central
Old 03-16-2010 , 17:50   Re: Help
Reply With Quote #17

basic example of what I gather you want
PHP Code:
#include <superheromod>

// GLOBAL VARIABLES
new gHeroID;
new 
bool:gHasTest[SH_MAXSLOTS+1];
new 
pcvar_coolpcvar_dmg;
//----------------------------------------------------------------------------------------------
public plugin_init()
{
    
// Plugin Info
    
register_plugin("SUPERHERO Test""0.1""Random1")

    
// DO NOT EDIT THIS FILE TO CHANGE CVARS, USE THE SHCONFIG.CFG
    
new pcvarLevel register_cvar("test_level""0");
    
pcvar_cool register_cvar("test_cooldown""30.0");
    
pcvar_dmg register_cvar("test_pctdmg""0.1");

    
// FIRE THE EVENT TO CREATE THIS SUPERHERO!
    
gHeroID sh_create_hero("Test"pcvarLevel);
    
sh_set_hero_info(gHeroID"Leech Seed""Slowly absorb players health");
}
//----------------------------------------------------------------------------------------------
public sh_hero_init(idheroidmode)
    if ( 
heroid == gHeroID )
        
gHasTest[id] = mode true false;
//----------------------------------------------------------------------------------------------
public client_damage(attackervictimdamagewpnindex)
{
    if ( !
sh_is_active() ) return;
    if ( !
is_user_connected(victim) || !is_user_alive(attacker) ) return;

    
// Should nades not count? maybe remove them later
    
if ( gHasTest[attacker] && !gPlayerInCooldown[attacker] && CSW_P228 <= wpnindex <= CSW_P90 )
        
leech_player(victimattacker);
}
//----------------------------------------------------------------------------------------------
leech_player(victimattacker)
{
    if ( 
sh_is_active() && gHasTest[attacker] && is_user_alive(victim) )
    {
        
//first lets stun the player, we'll let them move a little cause stoping them all together can get cheap
        
sh_set_stun(victim3.075.0);
        
        new 
args[3]; args[0] = victimargs[1] = attacker
        
args[2] = floatround(floatclamp(get_pcvar_float(pcvar_dmg) * get_user_health(victim) / 10.01.0float(sh_get_max_hp(victim))));
        
set_task(0.3"drain_health"attackerargs3"a"10);        //loops our task to occur 10 times over a 3 second interval
        
        //set our cooldown now, assuming there is one
        
if (get_pcvar_float(pcvar_cool) > 0.0sh_set_cooldown(attackerget_pcvar_float(pcvar_cool));
    }
}
//----------------------------------------------------------------------------------------------
public drain_health(args[])
{
    static 
victimattackerdamagevictim args[0]; attacker args[1]; damage args[2];
    if ( !
is_user_alive(victim) || !is_user_alive(attacker) )
    {
        
remove_task(attacker);
        return;
    }
    
    
sh_extra_damage(victimattackerdamage"leech life");
    
sh_add_hp(attackerdamage0);
    
    
//and finally some kind of sprite effect, for now i'm gonna copy drac and just have the red flash    
    
sh_screen_fade(attacker0.50.25255101040); //Red Screen Flash
}
//----------------------------------------------------------------------------------------------
public client_connect(id)
    
gHasTest[id] = false;
//---------------------------------------------------------------------------------------------- 
change the damage formula with whatever you want, right now it'll deal a grand total of "test_pctdmg" cvar times players current health when hit. This is divided by 10 since you want a total of 10 repetitions of the loop. You can replace the sh_screen_fade with whatever sprite you want to play, since I don't feel like playing the guessing game on what you consider to be a "cool" sprite.
__________________
If at first you don't succeed, then skydiving isn't for you.
G-Dog is offline
Send a message via AIM to G-Dog
Jelle
[b]MOAR CANDY[/b]
Join Date: Aug 2009
Location: Denmark
Old 03-16-2010 , 22:04   Re: Help
Reply With Quote #18

He wants it to be a binded hero, not automatic.
__________________
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-17-2010 , 02:59   Re: Help
Reply With Quote #19

Quote:
Originally Posted by Jelle View Post
He wants it to be a binded hero, not automatic.
Thats right, though ill look into G-Dog's code as I might find a way to channel damage/lifedrain THX

@Jelle: Sorry for my indentation, lol it was ok in amxx studio and in the file, but when I copied it fucked me lol

The keydown one isnt working, ofc, I didnt added the bloodsuck or anything to keydown, anyone that could help me with it? Also G-Dog, is it the same to set a loop when its keydown?

@G-Dog: Thx for the awesome hero! We will probably use it as a separate hero and use it for the keydown one. Thx! We discovered one bug though, if you as an admin give player X 9999999 hp, you only damage the enemy and slows him/her. I e you dont get any hp back. But when on 100 hp, its a looovely hero. Thx! But, is there any chance of making that lovely hero keydown? And if im right, you use ; to end a line in all of your coding?
__________________

Last edited by The Art of War; 03-17-2010 at 08:53.
The Art of War is offline
G-Dog
Senior Member
Join Date: Dec 2005
Location: Thunderstorm Central
Old 03-17-2010 , 09:29   Re: Help
Reply With Quote #20

replace
PHP Code:
public client_damage(attackervictimdamagewpnindex)
{
    if ( !
sh_is_active() ) return;
    if ( !
is_user_connected(victim) || !is_user_alive(attacker) ) return;

    
// Should nades not count? maybe remove them later
    
if ( gHasTest[attacker] && !gPlayerInCooldown[attacker] && CSW_P228 <= wpnindex <= CSW_P90 )
        
leech_player(victimattacker);

with
PHP Code:
public sh_hero_key(idheroIDkey)
{
    if ( 
gHeroID != heroID ) return;

    if ( 
key )    //ya I know, instead of sticking with one method I went with yet another method of checking keydown just to f with yall
    
{
        new 
tidtbody;
        
get_user_aiming(idtidtbody);
        
        if ( 
is_user_alive(tid) && gHasTest[id] && !gPlayerInCooldown[id] && (cs_get_user_team(id) != cs_get_user_team(tid) || sh_friendlyfire_on()) )
            
leech_player(tidid);
    }

and add the
PHP Code:
sh_set_hero_bind(gHeroID); 
at the plugin_init and its a bind hero
__________________
If at first you don't succeed, then skydiving isn't for you.
G-Dog is offline
Send a message via AIM to G-Dog
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 17:52.


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