【寻求】请问谁有10second_timeleft插件的源码?
我只有amx版的10second_timeleft插件,现改用了AMXX,这插件不能用了,如果谁有这插件的源码上传上来好吗,多谢了!!!回复: 【寻求】请问谁有10second_timeleft插件的源码?
#include <amxmod>new g_TimeSet
new g_LastTime
new g_CountDown
new g_Switch
public plugin_init() {
register_plugin("10Sec_TimeLeft","0.1","default")
register_cvar("amx_time_voice","1")
register_srvcmd("amx_10sec_display","setDisplaying")
register_cvar("amx_timeleft","00:00",FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY)
register_clcmd("say /timeleft","sayTimeLeft",0,"- displays timeleft")
register_clcmd("say /thetime","sayTheTime",0,"- displays current time")
set_task(0.8,"timeRemain",8648458,"",0,"b")
}
public sayTheTime(id){
if ( get_cvar_num("amx_time_voice") ){
new mhours, mmins, whours, wmins, wpm
get_time("%H",mhours,5)
get_time("%M",mmins,5)
new mins = strtonum(mmins)
new hrs = strtonum(mhours)
if (mins)
num_to_word(mins,wmins,31)
else
wmins = 0
if (hrs < 12)
wpm = "am "
else {
if (hrs > 12) hrs -= 12
wpm = "pm "
}
if (hrs)
num_to_word(hrs,whours,31)
else
whours = "twelve "
client_cmd(id, "spk ^"fvox/bell time_is_now %s_period %s%s^"",whours,wmins,wpm )
}
new ctime
get_time("%Y/%m/%d - %H:%M:%S",ctime,63)
client_print(0,print_chat, "板ㄦ锛 %s",ctime )
return PLUGIN_CONTINUE
}
public sayTimeLeft(id){
if (get_cvar_float("mp_timelimit")) {
new a = get_timeleft()
if ( get_cvar_num("amx_time_voice") ) {
new svoice
setTimeVoice( svoice , 127 , 0 , a )
client_cmd( id , svoice)
}
client_print(0,print_chat, "╀堕:%d:%02d", (a / 60) , (a % 60) )
}
else
client_print(0,print_chat, "堕撮" )
return PLUGIN_CONTINUE
}
setTimeText(text[],len,tmlf){
new secs = tmlf % 60
new mins = tmlf / 60
new nextmap
get_cvar_string("amx_nextmap",nextmap,31)
if (secs == 0)
format(text,len,"╀堕达: %d Minute%s^n^n涓涓骞板撅 %s", mins , (mins > 1) ? "s" : "",nextmap )
else if (mins == 0)
format(text,len,"╀堕达: %d Second%s^n^n涓涓骞板撅 %s",secs,(secs > 1) ? "s" : "",nextmap )
else
format(text,len,"╀堕达: %d Minute%s %d Second%s^n^n涓涓骞板撅 %s", mins , (mins > 1) ? "s" : "" ,secs ,(secs > 1) ? "s" : "",nextmap )
}
setTimeVoice(text[],len,flags,tmlf){
new temp
new secs = tmlf % 60
new mins = tmlf / 60
for(new a = 0;a < 7;++a)
temp = 0
if (secs > 0){
num_to_word(secs,temp,31)
if (!(flags & 8)) temp = "seconds " /* there is no "second" in default hl */
}
if (mins > 59){
new hours = mins / 60
num_to_word(hours,temp,31)
if (!(flags & 8)) temp = "hours "
mins = mins % 60
}
if (mins > 0) {
num_to_word(mins ,temp,31)
if (!(flags & 8)) temp ="minutes "
}
if (!(flags & 4)) temp = "remaining "
return format(text,len,"spk ^"vox/%s%s%s%s%s%s%s^"", temp,temp,temp,temp,temp,temp,temp )
}
findDispFormat(time){
for(new i = 0;g_TimeSet;++i){
if (g_TimeSet & 16){
if (g_TimeSet > time){
if (!g_Switch) {
g_CountDown = g_Switch = time
remove_task(8648458)
set_task(1.0,"timeRemain",34543,"",0,"b")
}
return i
}
}
else if (g_TimeSet == time){
return i
}
}
return -1
}
public setDisplaying(){
new arg, flags, num
new argc = read_argc() - 1
new i = 0
while (i < argc && i < 32){
read_argv(i+1,arg,31)
parse(arg,flags,31,num,31)
g_TimeSet = str_to_num(num)
g_TimeSet = read_flags(flags)
i++
}
g_TimeSet = 0
return PLUGIN_HANDLED
}
public timeRemain(param[]){
new gmtm = get_timeleft()
new tmlf = g_Switch ? --g_CountDown : gmtm
new stimel
format(stimel,11,"%02d:%02d",gmtm / 60, gmtm % 60)
set_cvar_string("amx_timeleft",stimel)
if ( g_Switch && gmtm > g_Switch ) {
remove_task(34543)
g_Switch = 0
set_task(0.8,"timeRemain",8648458,"",0,"b")
return
}
if (tmlf > 0 && g_LastTime != tmlf){
g_LastTime = tmlf
new tm_set = findDispFormat(tmlf)
if ( tm_set != -1){
new flags = g_TimeSet
new arg
if (flags & 1){
setTimeText(arg,127,tmlf)
if (flags & 16)
set_hudmessage(255, 255, 255, -1.0, 0.6, 0, 0.0, 1.1, 0.1, 0.5, 1)
else
set_hudmessage(255, 255, 255, -1.0, 0.6, 0, 0.0, 4.0, 0.0, 0.5, 1)
show_hudmessage(0,arg)
}
if (flags & 2){
setTimeVoice(arg,127,flags,tmlf)
client_cmd(0,arg)
}
}
}
}
看看这个
回复: 【寻求】请问谁有10second_timeleft插件的源码?
这个不对,你这除了register_srvcmd("amx_10sec_display","setDisplaying")这句是改过,
其它的都和timeleft一样的,不能实现换图最后10倒计时
那个amx_10sec_display不会是你换上去的吧??
我想本区的几个版主应该收有这个插件的源码,麻烦找找好吗,好需要哦!
回复: 【寻求】请问谁有10second_timeleft插件的源码?
需要安装其它插件吗?amx(x)本身的插件timeleft有这个功能。
amx_time_display "ab 1200" "ab 600" "ab 300" "ab 180" "ab 60" "abcde 11"
回复: 【寻求】请问谁有10second_timeleft插件的源码?
即使加了后面那段amx_time_display "ab 1200" "ab 600" "ab 300" "ab 180" "ab 60" "abcde 11"
但是我一直未见过它的最后10秒倒计时,
你们有见过么???
回复: 【寻求】请问谁有10second_timeleft插件的源码?
请问yanexp你找到这个插件了吗有的话麻烦也给我一个吧 :burn:
回复: 【寻求】请问谁有10second_timeleft插件的源码?
Post by AE86请问yanexp你找到这个插件了吗
有的话麻烦也给我一个吧 :burn:
其实正如undoer 所说的那样
我测试时将时间缩得太短所以没看到倒计提示
后来不管它换图前有提示了
回复: 【寻求】请问谁有10second_timeleft插件的源码?
Post by yanexp其实正如undoer 所说的那样
我测试时将时间缩得太短所以没看到倒计提示
后来不管它换图前有提示了
那你的服务器在stats.ini中添加BombCountVoice ;Bomb Count Down
BombCountDef ;Bomb Count Down (def)会显示C4倒记时吗,我的好像只有活着的人才看得到,有时候又看不到
回复: 【寻求】请问谁有10second_timeleft插件的源码?
楼主找到了没有,,,,我一直在关注此事!!!如果找到了请贴上来,谢谢!回复: 【寻求】请问谁有10second_timeleft插件的源码?
:rolleyes::spiderman:boss:10second_timeleft.amx ; 10秒倒数
页:
[1]