Raised This Month: $ Target: $400
 0% 

Can someone tell me whats wrong here?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
jamaiz
Junior Member
Join Date: Nov 2013
Old 11-22-2013 , 08:27   Can someone tell me whats wrong here?
Reply With Quote #1

PHP Code:
#define DAMAGE_RECIEVED
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

new health_add
new health_hs_add
new health_max
new nKiller
new nKiller_hp
new nHp_add
new nHp_max

public plugin_init()
{
    
register_plugin("kill_healed""2.0""Dev!l")
    
health_add register_cvar("hp""15")
    
health_hs_add register_cvar("hp_hs""30")
    
health_max register_cvar("max_hp""100")
    
register_event("DeathMsg","hook_death","a"
}
public 
hook_death()
{
    
// Killer id
    
nKiller read_data(1)
    
    if ( (
read_data(3) == 1) && (read_data(5) == 0) )
    {
        
nHp_add get_pcvar_num (health_hs_add)
    }
    else
        
nHp_add get_pcvar_num (health_add)
    
nHp_max get_pcvar_num (health_max)
    
// Updating Killer HP
    
if(!(get_user_flags(nKiller) & ADMIN_LEVEL_H))
        return;
    
    
nKiller_hp get_user_health(nKiller)
    
nKiller_hp += nHp_add
    
// Maximum HP check
    
if (nKiller_hp nHp_maxnKiller_hp nHp_max
    set_user_health
(nKillernKiller_hp)
    
// Hud message "Healed +15/+30 hp"
    
set_hudmessage(02550, -1.00.1501.01.00.10.1, -1)
    
show_hudmessage(nKiller"Healed +%d hp"nHp_add)
    
// Screen fading
    
message_begin(MSG_ONEget_user_msgid("ScreenFade"), {0,0,0}, nKiller)
    
write_short(1<<10)
    
write_short(1<<10)
    
write_short(0x0000)
    
write_byte(0)
    
write_byte(0)
    
write_byte(200)
    
write_byte(75)
    
message_end()
    
}


/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1054\\ f0\\ fs16 \n\\ par }
*/ 
It was working, then I disabled it for sometime, when I re-enabled it, it just doesn't work. Any Fix?
jamaiz is offline
 



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 23:19.


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