0920357689 发表于 2007-12-16 09:16:21

amxx_Timeleft_Bar問題

#include <amxmodx>
#include <engine>
new g_msgBarTime, bool:showtime = false
public plugin_init()
{
register_plugin("AMXX Timeleft Bar", "1.0", "Cheap_Suit")
register_cvar("amx_timeleft_bar", "20")

g_msgBarTime = get_user_msgid("BarTime")
}
public client_PreThink(id)
{
if(!is_user_connected(id))
return PLUGIN_CONTINUE
if(!get_cvar_float("mp_timelimit"))
return PLUGIN_CONTINUE
new timeleft = (get_timeleft() + 1)
if(timeleft <= get_cvar_num("amx_timeleft_bar"))
{
client_print(id, print_center, "距離換地圖時間剩餘 %d 秒", timeleft)
if(showtime == false)
{
   showtime = true
   ProgressBar(id, timeleft)
   set_task(float(timeleft), "removeProgressBar", id)
}
}
return PLUGIN_CONTINUE
}
public removeProgressBar(id)
{
ProgressBar(id, 0)
}
stock ProgressBar(id, seconds)
{
message_begin(MSG_ONE, g_msgBarTime, {0, 0, 0}, id)
write_byte(seconds)
write_byte(0)
message_end()
}

請問怎樣才能移除那條完成棒
在完場時距離換地圖時間剩餘 %d 秒位置下方的完成棒

0920357689 发表于 2007-12-16 10:25:48

回复: amxx_Timeleft_Bar問題

同貼問誰有那個失敗者爆炸處死插件?

zwfgdlc 发表于 2007-12-16 17:47:27

回复: amxx_Timeleft_Bar問題

失敗方處死是很簡單的

#include <amxmodx>
#include <amxmisc>
#define PLUGIN_NAME "killlose"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "zwfgdlc"
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
register_logevent("killlose",6,"0=Team","2=triggered")
}
public killlose()
{
new arg,players,snum
read_logargv(1,arg,15)
get_players(players,snum,"ae",equal(arg,"TERRORIST")?"CT":"TERRORIST")
for(new i=0;i<snum;i++)
{
user_kill(players)
}
}

試下修改這樣能不能移除完成棒

if(timeleft <= get_cvar_num("amx_timeleft_bar"))
{
client_print(id, print_center, "距離換地圖時間剩餘 %d 秒", timeleft)
/* if(showtime[id] == false)
{
   showtime[id] = true
   ProgressBar(id, timeleft)
   set_task(float(timeleft), "removeProgressBar", id)
}*/
}
return PLUGIN_CONTINUE
}
/*
public removeProgressBar(id)
{
ProgressBar(id, 0)
}
stock ProgressBar(id, seconds)
{
message_begin(MSG_ONE, g_msgBarTime, {0, 0, 0}, id)
write_byte(seconds)
write_byte(0)
message_end()
}
*/

0920357689 发表于 2007-12-17 17:08:49

回复: amxx_Timeleft_Bar問題

Post by zwfgdlc
失敗方處死是很簡單的

#include <amxmodx>
#include <amxmisc>
#define PLUGIN_NAME "killlose"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "zwfgdlc"
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
register_logevent("kil...
失敗方處死我想要有爆炸效果那一個...還有被處死時死亡數不會加和分數不會減
页: [1]
查看完整版本: amxx_Timeleft_Bar問題