八云の橙貓
|
分享:
▲
▼
這個是外國人弄的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 |
|
|
|