AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Need help with plugin (https://forums.alliedmods.net/showthread.php?t=132565)

CrazyChickenTest 07-16-2010 11:10

Need help with plugin
 
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

Sylwester 07-16-2010 12:38

Re: Need help with plugin
 
1 Attachment(s)
try this

CrazyChickenTest 07-16-2010 15:05

Re: Need help with plugin
 
thx it's workin very good. I have one more question: Is that possible to heal only when player who heal have knive?

Sylwester 07-16-2010 16:52

Re: Need help with plugin
 
1 Attachment(s)
yea it's possible

CrazyChickenTest 07-16-2010 18:15

Re: Need help with plugin
 
thanks ;)


All times are GMT -4. The time now is 07:10.

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