Hello,
While using new TF2 engine I found next differences:
The first one:
I am using motd message to show some info to player and would like to
use the possibility to run a command if button on motd dlg is pressed.
The problem now is, as I guess, that motd message format is changed and
I failed to use the old codebase:
INetworkStringTable *pInfoPanel =
networkstringtable->FindTable("InfoPanel");
if (!pInfoPanel)
{
return;
}
bool save = engine->LockNetworkStringTables(false);
int StrIdx = pInfoPanel->AddString(TRUE, "my_info");
pInfoPanel->SetStringUserData(StrIdx, 4 , "motd");
engine->LockNetworkStringTables(save);
bf_write *buffer;
MRecipientFilter filter;
int index = engine->IndexOfEdict(pEntity);
filter.AddRecipient(index);
buffer = engine->UserMessageBegin(&filter, 12);
buffer->WriteString("info");
buffer->WriteByte(1);
if (cmd != "") // command that I would like to be send when button
on MOTD dlg is pressed
buffer->WriteByte(4);
else
buffer->WriteByte(3);
buffer->WriteString("title");
buffer->WriteString(title.c_str());
buffer->WriteString("type");
buffer->WriteString("1");
buffer->WriteString("msg");
buffer->WriteString("my_info");
if (cmd != "") // command that I would like to be send when button
on MOTD dlg is pressed
{
buffer->WriteString("cmd");
buffer->WriteString(cmd.c_str());
}
engine->MessageEnd();
May be anyone knows new format of motd msg and how to use it properly?
The second:
Now to assign player to a team he/she should run jointeam red/blue
instead of jointeam 2/3. I understand that red and blue are team names
for TF2 but what will happen when CSS is released under this engine?
Thanks In Advance,
Denis.
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders