Raised This Month: $ Target: $400
 0% 

c4 hud fix


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SAMURAI16
BANNED
Join Date: Sep 2006
Old 02-24-2007 , 09:37   Re: c4 hud fix
Reply With Quote #1

i remaked with pcvars, and doesent works
CODE:
Code:
#include <amxmodx>
#include <amxmisc>
#include <csx>

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

new const PLUGIN[] = "Bomb CountHUD Timer"
new const VERSION[] = "0.1"
new const AUTHOR[] = "SAMURAI"

public plugin_init()
{
    register_plugin(PLUGIN,VERSION,AUTHOR);
   
    pointnum = get_cvar_pointer("mp_c4timer");
    
    register_event("RoundTime", "newRound", "bc");
    register_event("SendAudio", "endRound", "a", "2&%!MRAD_terwin", "2&%!MRAD_ctwin", "2&%!MRAD_rounddraw");
    
    
    mp_timec4 = get_pcvar_num(pointnum);
}


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

public endRound()
{
    mp_timec4 = get_pcvar_num(pointnum);
    
    g_c4timer = -2
}

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

public bomb_defused()
{
    mp_timec4 = get_pcvar_num(pointnum)
    
    if(b_planted)
    remove_task(652450);
}

public bomb_explode()
{
    mp_timec4 = get_pcvar_num(pointnum)

    if(b_planted)
    remove_task(652450)
    
}
   
   
public dispTime()
{
    mp_timec4 = get_pcvar_num(pointnum)
    
    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",g_c4timer)
    g_c4timer--
    
}
It's changed the mp_c4timer timer cvar, and i don't understand why
Have anybody an idea to fix it ?
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
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 00:43.


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