MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / HintTextMsg

Method HintTextMsg

core/HalfLife2.cpp:629–659  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

627}
628
629bool 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
661bool CHalfLife2::HintTextMsg(cell_t *players, int count, const char *msg)
662{

Callers 2

PrintHintTextFunction · 0.80
DrawHintProgressMethod · 0.80

Calls 4

StartProtobufMessageMethod · 0.80
StartBitBufMessageMethod · 0.80
EndMessageMethod · 0.80
GetKeyValueMethod · 0.45

Tested by

no test coverage detected