Raised This Month: $ Target: $400
 0% 

Need help with plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CrazyChickenTest
Member
Join Date: Jul 2010
Location: World ;)
Old 07-16-2010 , 11:10   Need help with plugin
Reply With Quote #1

I use this plugin http://forums.alliedmods.net/showthread.php?t=62756 and I try to do that if you're not targeting on player you can heal yourself I think I must modify this:
PHP Code:
public start_healing_process(idtargetid){
    
    
stop_healing_process(id)
    
check_health(targetid)
    if(
g_p_healers[targetid] >= get_pcvar_num(g_maxhealers)){
        if(
g_snd_frames[id] == 0)
            
sndl_add(id)
        
g_snd_next[id] = EIM_SND_UNABLE
        
}else if((g_p_points[id] <= NO_HEAL_POINTS && get_pcvar_num(g_healpoints) > ) || g_p_dmg[targetid] <= NO_DAMAGE){
        if(
g_snd_frames[id] == 0)
            
sndl_add(id)
        
g_snd_next[id] = EIM_SND_UNABLE
        
}else{
        
g_p_target[id] = targetid
        g_p_healers
[targetid]++
        
g_list_healers[PTR_LC]++
        
g_list_healers[g_list_healers[PTR_LC]] = id
        
if(g_snd_frames[id] == 0)
            
sndl_add(id)
        if(
g_snd_next[id] != EIM_SND_HEALING)
            
g_snd_next[id] = EIM_SND_START
        g_snd_frames
[id] = 0
    
}
    
}

public 
stop_healing_process(id){
    if(
g_p_target[id] != NO_TARGET){
        if(
g_snd_next[id] != EIM_SND_NONE)
            
g_snd_next[id] = EIM_SND_UNABLE
        
        g_p_healers
[g_p_target[id]]--
        
g_p_target[id] = NO_TARGET
        
        
static i
        i 
1
        
while(g_list_healers[i]!=id)
            
i++
        while(
i<g_list_healers[PTR_LC]){
            
g_list_healers[i] = g_list_healers[i+1]
            
i++
        }
        
g_list_healers[PTR_LC]--
    }

but I don't know where exactly I must do this
CrazyChickenTest is offline
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 07-16-2010 , 12:38   Re: Need help with plugin
Reply With Quote #2

try this
Attached Files
File Type: sma Get Plugin or Get Source (eim.sma - 554 views - 17.8 KB)
__________________
Impossible is Nothing
Sylwester is offline
CrazyChickenTest
Member
Join Date: Jul 2010
Location: World ;)
Old 07-16-2010 , 15:05   Re: Need help with plugin
Reply With Quote #3

thx it's workin very good. I have one more question: Is that possible to heal only when player who heal have knive?
__________________
Respect ;)

Last edited by CrazyChickenTest; 07-16-2010 at 15:12.
CrazyChickenTest is offline
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 07-16-2010 , 16:52   Re: Need help with plugin
Reply With Quote #4

yea it's possible
Attached Files
File Type: sma Get Plugin or Get Source (eim.sma - 537 views - 18.5 KB)
__________________
Impossible is Nothing
Sylwester is offline
CrazyChickenTest
Member
Join Date: Jul 2010
Location: World ;)
Old 07-16-2010 , 18:15   Re: Need help with plugin
Reply With Quote #5

thanks ;)
__________________
Respect ;)
CrazyChickenTest 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 07:10.


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