八云の橙猫
|
分享:
▲
▼
这个是外国人弄的stock 需要用这个才有颜色字 复制程式
stock client_printcolor(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[1024]
vformat(msg, 1023, input, 3)
replace_all(msg, 1023, "/g", "^4")
replace_all(msg, 1023, "/y", "^1")
replace_all(msg, 1023, "/ctr", "^3")
if (id)
players[0] = id
else
get_players(players, count, "ch")
for (new i = 0;i < count;i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
write_byte(players[i])
write_string(msg)
message_end()
}
}
}
用法: 复制程式
client_printcolor(index, "/g绿色/y黄色/ctr队伍色")
|
|
x0
[1 楼]
From:台湾中华电信股份有限公司 | Posted:2013-03-29 18:14 |
|
|
弑血
|
分享:
▲
▼
stock的写法 一楼的人已经有说了。 把这整段的stock贴入你的sma里。
语法在这行: client_printcolor(const id, const input[], any:...)
stock client_printcolor(const id, const input[], any:...) { new count = 1, players[32] static msg[1024] vformat(msg, 1023, input, 3) replace_all(msg, 1023, "/g", "^4") replace_all(msg, 1023, "/y", "^1") replace_all(msg, 1023, "/ctr", "^3") if (id) players[0] = id else get_players(players, count, "ch")
for (new i = 0;i < count;i++) { if (is_user_connected(players)) { message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players) write_byte(players) write_string(msg) message_end() } } }
|
|
x0
[6 楼]
From:台湾中华电信股份有限公司 | Posted:2013-04-01 05:29 |
|
|
|