搜索
查看: 1479|回复: 0

源码有点错误,请哪位帮帮忙...............

[复制链接]
发表于 2008-3-7 14:08:16 | 显示全部楼层 |阅读模式 来自 中国–广西–百色
它有时会显示在两个地方(即这里一个,那里一个),不知道错在哪里.............

//**************************
#include <amxmod>
#include <amxmisc>

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

new const PLUGIN[] = "C4"
new const VERSION[] = "0.1"
new const AUTHOR[] = "A.MI"

public plugin_init()
{
register_plugin(PLUGIN,VERSION,AUTHOR);
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()
{
mp_timec4 = get_cvar_num("mp_c4timer")
{
client_cmd(0, "spk misc/C4start")
}
b_planted = true;
g_c4timer = mp_timec4
set_task(1.0, "dispTime", 652450, "", 0, "b")
}

public bomb_defused()
{
mp_timec4 = get_cvar_num("mp_c4timer")

if(b_planted)
  remove_task(652450);
}

public bomb_explode()
{
mp_timec4 = get_cvar_num("mp_c4timer")

if(b_planted)
  remove_task(652450)

}
public dispTime()
{

mp_timec4 = get_cvar_num("mp_c4timer")

if(!b_planted)
  remove_task(652450)
  
if(g_c4timer > 11) set_hudmessage(0, 255, 255, 0.3,0.5)

if(g_c4timer <= 10) set_hudmessage(255, 0, 0, 0.3,0.5)

show_hudmessage(0, "C 4 :  %d",g_c4timer)
g_c4timer--
}  

public plugin_precache()
{
precache_sound( "misc/C4start.wav")
return PLUGIN_CONTINUE
}
游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表