| 627 | } |
| 628 | |
| 629 | bool CHalfLife2::HintTextMsg(int client, const char *msg) |
| 630 | { |
| 631 | cell_t players[] = {client}; |
| 632 | |
| 633 | #if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE || SOURCE_ENGINE == SE_MCV |
| 634 | CCSUsrMsg_HintText *pMsg; |
| 635 | if ((pMsg = (CCSUsrMsg_HintText *)g_UserMsgs.StartProtobufMessage(m_HinTextMsg, players, 1, USERMSG_RELIABLE)) == NULL) |
| 636 | { |
| 637 | return false; |
| 638 | } |
| 639 | |
| 640 | pMsg->set_text(msg); |
| 641 | #else |
| 642 | bf_write *pBitBuf = NULL; |
| 643 | |
| 644 | if ((pBitBuf = g_UserMsgs.StartBitBufMessage(m_HinTextMsg, players, 1, USERMSG_RELIABLE)) == NULL) |
| 645 | { |
| 646 | return false; |
| 647 | } |
| 648 | |
| 649 | const char *pre_byte = g_pGameConf->GetKeyValue("HintTextPreByte"); |
| 650 | if (pre_byte != NULL && strcmp(pre_byte, "yes") == 0) |
| 651 | { |
| 652 | pBitBuf->WriteByte(1); |
| 653 | } |
| 654 | pBitBuf->WriteString(msg); |
| 655 | #endif |
| 656 | g_UserMsgs.EndMessage(); |
| 657 | |
| 658 | return true; |
| 659 | } |
| 660 | |
| 661 | bool CHalfLife2::HintTextMsg(cell_t *players, int count, const char *msg) |
| 662 | { |
no test coverage detected