|
发表于 2003-6-22 22:27:47
|
显示全部楼层
来自 中国–福建–厦门
应该是这样了,你自己测试一下吧
该的眼睛都花掉了~~
public new_score()
{
if ((match_inprogress == 2)||(match_inprogress == 4)) { // Playing a half
new team[32]
read_data(1,team,31)
if (equal(team,"CT"))
ct_score[1] = read_data(2)
else {
if (equal(team,"TERRORIST"))
t_score[1] = read_data(2)
}
new show_score = get_cvar_num("amx_match_showscore")
if (show_score) {
set_hudmessage(0, 100, 200, 0.05, 0.75, 0, 6.0, 6.0, 0.5, 0.15, 1)
if (match_inprogress == 2) {
if (ct_score[1] > t_score[1])
show_hudmessage(0,"* [AMX MATCH] CT's are winning! %s:%d to %s:%d",clanCT,ct_score[1],clanT,t_score[1])
else {
if (ct_score[1] < t_score[1])
show_hudmessage(0,"* [AMX MATCH] T's are winning %s:%d to %s:%d",clanT,t_score[1],clanCT,ct_score[1])
else {
if (ct_score[1] == t_score[1] && t_score[1] != 0)
show_hudmessage(0,"* [AMX MATCH] Both teams have won %d rounds",ct_score[1])
}
}
}
else {
new total[2]
total[0] = ct_score[0] + t_score[1]
total[1] = t_score[0] + ct_score[1]
if (total[0] > total[1])
show_hudmessage(0,"* [AMX MATCH] T's are winning %s:%d to %s:%d",clanT,total[0],clanCT,total[1])
else {
if (total[0] < total[1])
show_hudmessage(0,"* [AMX MATCH] CT's are winning %s:%d to %s:%d",clanCT,total[1],clanT,total[0])
else {
if (total[0] == total[1])
show_hudmessage(0,"* [AMX MATCH] Both teams have won %d rounds",total[0])
}
}
}
}
}
if (matchtype1 == 1) { //Playing mr
if ( (match_inprogress == 2) && ((ct_score[1] + t_score[1]) == matchtype2) ) { // Playing 1st half and it's finished
ct_score[0] = ct_score[1]
t_score[0] = t_score[1]
ct_score[1] = 0
t_score[1] = 0
new hudmsg[512]
format(hudmsg,511,"--[ 1st Half Finished. GH all ]--^n^nScore is: %s %i / %s %i %s^nWe are going back in warmup.",clanCT ,ct_score[0],clanT,t_score[0],(swap_type==1) ? "^n^nDON'T CHANGE YOUR TEAM! It's done automatically" : "")
set_hudmessage(255, 255, 255, -1.0, 0.32, 0, 2.0, 8.0, 0.8, 0.8, 4)
show_hudmessage(0,hudmsg)
match_inprogress = 3
print_wonids()
take_screenshot()
set_task(2.0,"start_warmup")
if (recdemo > 0)
set_task(3.0,"stop_demo")
if (swap_type == 1)
set_task(5.0,"swap")
}
else {
if (match_inprogress == 4) { // Playing 2nd half
if ( ((ct_score[1] + t_score[1]) == matchtype2) || ((end_type == 1)&&( ((ct_score[0] + t_score[1]) == (matchtype2 + 1)) || ((t_score[0] + ct_score[1]) == (matchtype2 + 1)) )) ) { // 2nd half is finished
ct_score[0] += t_score[1]
t_score[0] += ct_score[1]
new hudmsg[1024], pos
pos = format(hudmsg,1023,"--[ Match Finished. GG all ]--^n^nAnd the winner of the map is...^n")
if (ct_score[0] > t_score[0])
format(hudmsg[pos],1023-pos,"%s with the score of %s:%i/%s:%i",clanCT ,clanCT,ct_score[0],clanT,t_score[0])
else {
if (t_score[0] > ct_score[0])
format(hudmsg[pos],1023-pos,"%s with the score of %s:%i/%s:%i", clanT,clanT,t_score[0],clanCT,ct_score[0])
else
format(hudmsg[pos],1023-pos,"NONE!!! Both teams have %i wins.^n WHAT A MATCH!! :-D",ct_score[0])
}
set_hudmessage(255, 255, 255, -1.0, 0.32, 0, 2.0, 8.0, 0.8, 0.8, 4)
show_hudmessage(0,hudmsg)
match_inprogress = 0
print_wonids()
take_screenshot()
if (recdemo > 0)
set_task(2.0,"stop_demo")
set_task(3.0,"back_to_ffa")
}
}
}
}
return PLUGIN_CONTINUE
} |
|