
想在插件里打出这样的字吗?
好吧我就告诉大家
颜色指令: ^x04(绿色),^x03(队伍颜色,就是CT是蓝色,T红色),^x01(黄色)
指令: client_color(id, print_chat, "^x04(颜色)xxxxxxxxxx")
使用client_color要在插件源码加上下列语句
public client_color(playerid, colorid, msg[])
{
message_begin(playerid?MSG_ONE:MSG_ALL,get_user_msgid("SayText"),{0,0,0},playerid)
write_byte(colorid)
write_string(msg)
message_end()
}
还有一种比较实用,一般来说用这个的比较多
public client_color(playerid, colorid, const msg[], any:...)
{
static buffer[512]
vformat(buffer, charsmax(buffer), msg, 4)
message_begin(playerid?MSG_ONE:MSG_ALL,get_user_msgid("SayText"),{0,0,0},playerid)
write_byte(colorid)
write_string(buffer)
message_end()
}
new name[32]
get_user_name(id, name, charsmax(name))
client_color(id, id, "^x04你好,我的名字是^x03%s", name)
版主不给精你好意思吗?










此主题相关图片如下:
















