Raised This Month: $ Target: $400
 0% 

Compiling won't stop or won't even move


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
razieljohn619
Senior Member
Join Date: May 2011
Location: Philippines
Old 05-12-2011 , 21:00   Compiling won't stop or won't even move
Reply With Quote #1

hey guys please help me with this i know you guys are good at this.. the compiling of this .sma won't stop..it even won't move a thng..what this plugin does is it emits a low hp hearbeat when you have less hp and also displays a sprite when you have low hp.the sound and sprite will only be shown/hear to those who have less hp like 30..
heres the code

PHP Code:
================================================================================*/ 

#include <amxmodx> 
#include <fakemeta> 
#include <cstrike> 

#define lowhp "mw2/mw2lowhp.spr 
/*================================================================================ 
 [Plugin Customization] 
=================================================================================*/ 

// Constants 
new const g_heartbeat[] = "player/heartbeat1.wav" 

/*============================================================================*/ 

new cvar_heartbeathp 
new time_show_set[5.0
new 
spr_current[5.0

public 
plugin_precache() 

    
precache_sound(g_heartbeat


public 
plugin_init() 

    
register_plugin("MW2 Low Hp""1.1""RazielJohn619."
     
    
register_event("Damage""event_damage""be""2>0"
    
register_event("DeathMsg""event_deathmsg""a"
    
register_event("ResetHUD""event_resethud""be"
    
register_event("Spectator""event_spectator""a"
     
    
cvar_heartbeathp register_cvar("heartbeat_hp""25"
     


public 
event_damage(id

    if (
get_user_health(id) > get_pcvar_num(cvar_heartbeathp) ) 
        return 
     
    
// * Replaced with emit_sound so players near us can hear it too * 
    //client_cmd(id, "spk %s", g_heartbeat) 
    //emit_sound(id, CHAN_STATIC, g_heartbeat, 0.0, 0.0, SND_STOP, PITCH_NORM)  
     
    
emit_sound(idCHAN_AUTOg_heartbeat1.0ATTN_NORM0PITCH_NORM
     
     
    if (
get_user_health(id) > get_pcvar_num(cvar_heartbeathp) ) 
          return 
    
//client_cmd(id, "show_spr", spr_lowhp) 
    //show_spr(id, set_show_time(5), spr_lowhp) 
    
set_task(0.1"show_spr"id
     
    new  
show_spr(mw2lowhp
    new  
hide_spr 


public 
event_deathmsg() 

    
emit_sound(read_data(2), CHAN_AUTOg_heartbeat1.0ATTN_NORMSND_STOPPITCH_NORM


public 
event_resethud(id

    
emit_sound(idCHAN_AUTOg_heartbeat1.0ATTN_NORMSND_STOPPITCH_NORM


public 
event_spectator() 

    
emit_sound(read_data(1), CHAN_AUTOg_heartbeat1.0ATTN_NORMSND_STOPPITCH_NORM


public 
show_spr(ididspr

    new 
sec_c get_systime() 
    
time_show_set[id] = sec_c 
     
    hide_spr
(idspr_current[id]) 
    
spr_current[id] = idspr 
     
    
new spr_name[33
        if (
idspr==1spr_name "mw2lowhp" 
            
if(!(pev(id,pev_button) & FL_ONGROUND)) 
    {     
        
message_begin(MSG_ONE,iconstatus,{0,0,0},id); 
        
write_byte(1); // status (0=hide, 1=show, 2=flash) 
        
write_string(spr_name); // sprite name 
        
message_end(); 
        
spr_current[id] = 




public 
hide_spr(ididspr

     
    new 
spr_name[33
        if (
idspr==1spr_name "mw2lowhp" 

     
    
if(!(pev(id,pev_button) & FL_ONGROUND)) 
    {     
        
message_begin(MSG_ONE,iconstatus,{0,0,0},id); 
        
write_byte(0); // status (0=hide, 1=show, 2=flash) 
        
write_string(spr_name); // sprite name 
        
message_end(); 
        
spr_current[id] = 
         

and heres the sprite that will be shown http://www.mediafire.com/?azqva78uwz9urih
please guys i want this code to be fix and compiled without anything wrong..
razieljohn619 is offline
Send a message via Yahoo to razieljohn619
 



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 04:18.


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