Topic: Client -> server
Hi!
Its again me
How to send variable from client and receive it by server?
I wrote in gameclient.cpp
::OnNewSnapshot()
CMsgPacker Msg(123);
Msg.AddInt(1);
Client()->SendMsg(&Msg, MSGFLAG_VITAL);
And gamecontext.cpp
else if(MsgID == 123)
{
int w= pUnpacker->GetInt();
if (pUnpacker->Error())
pPlayer->m_MyVar= false;
else if(w)
pPlayer->m_MyVar= true;
else
pPlayer->m_MyVar = false;
}
It doesnt work. Im newbie with Client -> Server Msgs, pls explain in detail