|
发表于 2008-5-5 15:41:48
|
显示全部楼层
来自 中国–广东–深圳
回复: 帮忙修改一下
Post by zwfgdlc
[php]
public client_putinserver(id)
{
set_task(6.0,"show_client",id)
}
public client_color(playerid, colorid, msg[])
{
message_begin(playerid?MSG_ONE:MSG_ALL,get_user_msgid("SayText"),_,playerid)
write_byte(colorid)
write_string(msg)
message_end()
}
public show_client(id)
...
第一次看到formatex(),没怎么看明白copy back。。。。
formatex
[ Main ] [ Core ] [ string.inc ]
[ comments ]
formatex - Same as format(), except does not perform a "copy back" check.
Syntax:
formatex ( output[] ,len ,const format[] , {Float,Sql,Result,_}:... )
Type:
Native
Notes:
Same as format(), except does not perform a "copy back" check.
This means formatex() is faster, but DOES NOT ALLOW this type of call:
formatex(buffer, len, "%s", buffer)
formatex(buffer, len, buffer, buffer)
formatex(buffer, len, "%s", buffer[5])
This is because the output is directly stored into "buffer", rather than copied back at the end. |
|