Advertisement
jxsl13

Untitled

Apr 6th, 2015
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. int CServer::GetClientInfo(int ClientID, CClientInfo *pInfo)
  2. {
  3.     char aBuf[128];
  4.     str_format(aBuf, sizeof(aBuf), "client_id (%d) is not valid", ClientID);
  5.     dbg_assert(ClientID >= 0 && ClientID < MAX_CLIENTS, aBuf);
  6.     dbg_assert(pInfo != 0, "info can not be null");
  7.  
  8.     if(m_aClients[ClientID].m_State == CClient::STATE_INGAME)
  9.     {
  10.         pInfo->m_pName = m_aClients[ClientID].m_aName;
  11.         pInfo->m_Latency = m_aClients[ClientID].m_Latency;
  12.         pInfo->m_CustClt = m_aClients[ClientID].m_CustClt;
  13.         return 1;
  14.     }
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement