Raised This Month: $ Target: $400
 0% 

c4 hud fix


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
SAMURAI16
BANNED
Join Date: Sep 2006
Old 02-16-2007 , 13:06   c4 hud fix
Reply With Quote #1

hi, i maked this:
Code:
#include <amxmodx>
#include <amxmisc>
#include <csx>

new g_c4timer;
new mp_timec4;
new bool:b_planted = false;


public plugin_init()
{
    register_plugin("Test","0.1","SAMURAI");
    mp_timec4 = get_cvar_num("mp_c4timer")
    
    register_event("RoundTime", "newRound", "bc")
    register_event("SendAudio", "endRound", "a", "2&%!MRAD_terwin", "2&%!MRAD_ctwin", "2&%!MRAD_rounddraw")
}


public newRound()
{
    g_c4timer = 0
    b_planted = false;
}

public endRound()
{
    g_c4timer = -2
}

public bomb_planted()
{
    b_planted = true;
    g_c4timer = mp_timec4 
    set_task(1.0, "dispTime", 652450, "", 0, "b")
}

public dispTime()
{
    
    if(!b_planted)
    remove_task(652450)
    
    
    if(g_c4timer < 8) set_hudmessage(150, 0, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1)

    if(g_c4timer > 7) set_hudmessage(150, 150, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1)

    if(g_c4timer > 13) set_hudmessage(0, 150, 0, -1.0, 0.80, 0, 1.0, 1.0, 0.01, 0.01, -1)
        
    show_hudmessage(0, "C4: %d",max(--g_c4timer,0))
    
}
But doesen't works correctly
So, for example "mp_c4timer is 35", appear with hudmessage only C4 : 34 ;
Any ideia to fix this ? thanks
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
 


Thread Tools
Display Modes

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 00:43.


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