Author Topic: New RPG style HUD [CS:S & TF2]  (Read 17337 times)

Remy Lebeau

  • Sr. Member
  • ****
  • Posts: 497
    • View Profile
Re: New RPG style HUD [CS:S & TF2]
« Reply #25 on: June 16, 2014, 06:22:29 PM »
Unfortunately the bug in SM has not been fixed.

I've created a more complex version that has a few options that allow for ways around this.  I'll update the OP with the new version and changelog.

techwarfare

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: New RPG style HUD [CS:S & TF2]
« Reply #26 on: July 16, 2014, 03:05:03 AM »
Thanks for the HUD Remy.

Edited
I have come back to see if i can get the HUD again but it seems the link is no longer here. am i able to get a version of this Remy or anyone?
« Last Edit: October 05, 2014, 06:02:36 AM by techwarfare »

Remy Lebeau

  • Sr. Member
  • ****
  • Posts: 497
    • View Profile
Re: New RPG style HUD [CS:S & TF2]
« Reply #27 on: April 23, 2015, 05:28:56 PM »
So it seems that CS:GO has changed the way keyhinttext works, so that it's now displayed in the hint box... useless!

Can anyone think of a way to make this work on cs:go?

Necavi

  • Sr. Member
  • ****
  • Posts: 499
    • View Profile
Re: New RPG style HUD [CS:S & TF2]
« Reply #28 on: April 23, 2015, 05:49:51 PM »
From what I have seen it supports neither KeyHintText nor HudText, so...no, it isn't possible.

Remy Lebeau

  • Sr. Member
  • ****
  • Posts: 497
    • View Profile
Re: New RPG style HUD [CS:S & TF2]
« Reply #29 on: April 24, 2015, 06:03:36 PM »
From what I have seen it supports neither KeyHintText nor HudText, so...no, it isn't possible.

That's a shame.  I'd gotten quite used to playing with all that information on the screen :S

El Diablo

  • Hero Member
  • *****
  • Posts: 1126
    • View Profile
    • War3Evo
Re: New RPG style HUD [CS:S & TF2]
« Reply #30 on: June 18, 2015, 08:07:23 AM »
The most recent update for TF2 has broken this also.

The PrintHintText now displays in a box in the bottom middle of the screen instead of the bottom right.

Necavi

  • Sr. Member
  • ****
  • Posts: 499
    • View Profile

El Diablo

  • Hero Member
  • *****
  • Posts: 1126
    • View Profile
    • War3Evo
Re: New RPG style HUD [CS:S & TF2]
« Reply #32 on: June 19, 2015, 11:41:00 AM »

Necavi

  • Sr. Member
  • ****
  • Posts: 499
    • View Profile
Re: New RPG style HUD [CS:S & TF2]
« Reply #33 on: June 19, 2015, 11:49:19 AM »
I'm pointing YOU to your OWN thread which explains what you're babbling about.

El Diablo

  • Hero Member
  • *****
  • Posts: 1126
    • View Profile
    • War3Evo
Re: New RPG style HUD [CS:S & TF2]
« Reply #34 on: June 19, 2015, 12:15:15 PM »
Fixing it for TF2, I had to comment out that stuff:

Code: [Select]
//bool g_bCanEnumerateMsgType = false;
UserMsg g_umsgKeyHintText = INVALID_MESSAGE_ID;

public OnPluginStart()
{
    //if(GetFeatureStatus(FeatureType_Native, "GetUserMessageType") == FeatureStatus_Available)
    //{
        //g_bCanEnumerateMsgType = true;
    //}

    g_umsgKeyHintText = GetUserMessageId("KeyHintText");
    if (g_umsgKeyHintText == INVALID_MESSAGE_ID)
    {
        LogError("This game doesn't support KeyHintText!");
        PrintToServer("This game doesn't support KeyHintText!");
    }
}

stock Handle StartMessageExOne(UserMsg msg, int client, int flags=0)
{
    int players[1];
    players[0] = client;
    return StartMessageEx(msg, players, 1, flags);
}
 
stock bool stockKeyHintText(int client, char format[254])
{
    Handle userMessage = StartMessageExOne(g_umsgKeyHintText, client);
    if(userMessage != INVALID_HANDLE)
    {
        SetGlobalTransTarget(client);
 
        //if (g_bCanEnumerateMsgType && GetUserMessageType() == UM_Protobuf)
        //{
            //PbSetString(userMessage, "hints", format);
        //}
        //else
        //{
        BfWriteByte(userMessage, 1);
        BfWriteString(userMessage, format);
        //}
        EndMessage();
    }
    return true;
}