|
发表于 2007-12-16 17:47:27
|
显示全部楼层
来自 中国–广东–惠州–惠城区
回复: amxx_Timeleft_Bar問題
失敗方處死是很簡單的
[php]
#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[16],players[32],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)
}
}
[/php]
試下修改這樣能不能移除完成棒- [color=#007700]if([/color][color=#0000bb]timeleft [/color][color=#007700]<= [/color][color=#0000bb]get_cvar_num[/color][color=#007700]([/color][color=#dd0000]"amx_timeleft_bar"[/color][color=#007700]))
- {
- [/color][color=#0000bb]client_print[/color][color=#007700]([/color][color=#0000bb]id[/color][color=#007700], [/color][color=#0000bb]print_center[/color][color=#007700], [/color][color=#dd0000]"距離換地圖時間剩餘 %d 秒"[/color][color=#007700], [/color][color=#0000bb]timeleft[/color][color=#007700])
- /* if([/color][color=#0000bb]showtime[/color][color=#007700][[/color][color=#0000bb]id[/color][color=#007700]] == [/color][color=#0000bb]false[/color][color=#007700])
- {
- [/color][color=#0000bb]showtime[/color][color=#007700][[/color][color=#0000bb]id[/color][color=#007700]] = [/color][color=#0000bb]true
- ProgressBar[/color][color=#007700]([/color][color=#0000bb]id[/color][color=#007700], [/color][color=#0000bb]timeleft[/color][color=#007700])
- [/color][color=#0000bb]set_task[/color][color=#007700]([/color][color=#0000bb]float[/color][color=#007700]([/color][color=#0000bb]timeleft[/color][color=#007700]), [/color][color=#dd0000]"removeProgressBar"[/color][color=#007700], [/color][color=#0000bb]id[/color][color=#007700])
- }*/
- }
- return [/color][color=#0000bb]PLUGIN_CONTINUE
- [/color][color=#007700]}[/color]
- [color=#007700]/*
- public [/color][color=#0000bb]removeProgressBar[/color][color=#007700]([/color][color=#0000bb]id[/color][color=#007700])
- {
- [/color][color=#0000bb]ProgressBar[/color][color=#007700]([/color][color=#0000bb]id[/color][color=#007700], [/color][color=#0000bb]0[/color][color=#007700])
- }
- [/color][color=#0000bb]stock ProgressBar[/color][color=#007700]([/color][color=#0000bb]id[/color][color=#007700], [/color][color=#0000bb]seconds[/color][color=#007700])
- {
- [/color][color=#0000bb]message_begin[/color][color=#007700]([/color][color=#0000bb]MSG_ONE[/color][color=#007700], [/color][color=#0000bb]g_msgBarTime[/color][color=#007700], {[/color][color=#0000bb]0[/color][color=#007700], [/color][color=#0000bb]0[/color][color=#007700], [/color][color=#0000bb]0[/color][color=#007700]}, [/color][color=#0000bb]id[/color][color=#007700])
- [/color][color=#0000bb]write_byte[/color][color=#007700]([/color][color=#0000bb]seconds[/color][color=#007700])
- [/color][color=#0000bb]write_byte[/color][color=#007700]([/color][color=#0000bb]0[/color][color=#007700])
- [/color][color=#0000bb]message_end[/color][color=#007700]()
- }
- */[/color]
复制代码 |
|