stock set_servername(index, const str[], any:...)
{
static g_ServerName;
if (!g_ServerName)
g_ServerName = get_user_msgid("ServerName");
static szMessage[64];
vformat(szMessage, charsmax(szMessage), str, 3);
message_begin(index ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, g_ServerName, _, index);
write_string(szMessage);
message_end();
}
使用实例:
set_servername(0, "当前比分:9:5");
|