jamesjia
发表于 2009-8-29 06:53:27
colaawp
发表于 2009-8-29 07:32:22
修复BUG了。。真好。。
kittnight
发表于 2009-8-29 14:17:54
gip 修正版有人试过吗,还会不会跳PING```
hotdot
发表于 2009-8-30 11:17:19
不错,支持
纵横か天下
发表于 2009-8-30 11:39:57
哇!我正想要啊
谢谢楼主
我看看能否把他改成CS-OL的
hero123
发表于 2009-8-30 15:46:38
是不是真的 ..........
filly
发表于 2009-8-30 16:29:53
先记一下,有用再来拿。
LittleKu
发表于 2009-8-30 20:20:31
本帖最后由 kk阿朗 于 2009-8-30 20:23 编辑
支持一下!
我自己根据http://forums.alliedmods.net/showthread.php?p=813033这个贴子的原理,搞了一个!
用的文件都是他的!我只是把显示的内容改成比分!大家研究研究!如果有什么BUG,请回贴!#include <amxmodx>
#include <amxmisc>
#define PLUGIN_NAME "Team Score"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "K.K.Lv"
new pCvar_TaskTime
new iTeamScore
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
pCvar_TaskTime = register_cvar("amx_task_time", "10")
register_event("HLTV", "NewRound", "a", "1=0", "2=0")
register_event("TeamScore", "Event_TeamScore", "a" )
register_clcmd("say /score", "cmdScore")
}
public plugin_precache()
{
precache_generic("gfx/career/icon_!.tga")
precache_generic("gfx/career/icon_!-bigger.tga")
precache_generic("gfx/career/icon_i.tga")
precache_generic("gfx/career/icon_i-bigger.tga")
precache_generic("gfx/career/icon_skulls.tga")
precache_generic("gfx/career/round_corner_ne.tga")
precache_generic("gfx/career/round_corner_nw.tga")
precache_generic("gfx/career/round_corner_se.tga")
precache_generic("gfx/career/round_corner_sw.tga")
precache_generic("resource/TutorScheme.res")
precache_generic("resource/UI/TutorTextWindow.res")
}
public Event_TeamScore()
{
new iTeam
read_data(1, iTeam, 1)
iTeamScore[(iTeam=='C')?1:0] = read_data(2)
return PLUGIN_CONTINUE
}
public NewRound()
{
for (new id = 1; id < get_maxplayers(); id++)
{
static iMsg
format(iMsg, 127, "The Score:^nCT : %d VS TE : %d", iTeamScore, iTeamScore)
Create_Show(id, iMsg)
}
}
stock Create_Show(id, iMsg[])
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("TutorText"), {0, 0, 0}, id)
write_string(iMsg)
write_byte(0)
write_short(0)
write_short(0)
message_end()
remove_task(id)
set_task(get_pcvar_float(pCvar_TaskTime), "Remove_Show", id)
}
public Remove_Show(id)
{
remove_task(id)
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("TutorClose"), {0, 0, 0}, id)
message_end()
}
public cmdScore(id)
{
if (is_user_connected(id))
{
static iMsg
format(iMsg, 127, "The Score:^nCT : %d VS TE : %d", iTeamScore, iTeamScore)
Create_Show(id, iMsg)
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
LittleKu
发表于 2009-8-30 20:25:51
顺便再说一下!由于我这个代码是用记事本写的,所以如果有什么函数用错!请大家见谅!
因为不是在自己的电脑写的,只是无意看到这个贴,觉得搞成这样可能会比较好看点!
清心阁
发表于 2009-8-31 14:16:18
装上看看
页:
1
2
3
4
5
[6]
7
8
9
10
11
12
13
14
15