csgo-retakes icon indicating copy to clipboard operation
csgo-retakes copied to clipboard

HUD message indicating which site to retake

Open xPaw opened this issue 9 years ago • 19 comments

Something like this could work: 2014-12-08_00001

xPaw avatar Dec 08 '14 18:12 xPaw

I would love to work on this :) is the correct function to create such an alert PrintCenterText or PrintHintText? Or something else, because I have been searching for a while D:

I am new to source modding, so would love to try something low friction like this.

sinistersnare avatar Jan 22 '15 01:01 sinistersnare

PrintHintText should work for this. The only special note is that if you want colors in the message, you have to html format all the text (I believe).

You'd do the call in Event_RoundPostStart, after the Retakes_MessageToAll.

I'll have to think about dealing with the colors, since if you use the "RetakeSiteMessage" phrase (https://github.com/splewis/csgo-retakes/blob/master/translations/retakes.phrases.txt#L12), you'll have color tags in it - and there's no way to convert them to the html colors right now. That could be added, I could add a function to strip colors from strings, or maybe it could just be a separate phrase in the file with the html stuff for now.

... now that I write all that, no colors in that message are probably fine for now :)

splewis avatar Jan 22 '15 02:01 splewis

Having looked into the color stuff, it'd be simpler just to not put any colors in that hint text. I guess you would:

  • Get the text into a string from the RetakeSiteMessage translation phrase
  • remove the colors using StripColors
  • PrintHintText

for each client.

splewis avatar Jan 24 '15 01:01 splewis

This was one of the first problems I noticed with this plugin. Its kinda hard to see what site it is and sometime you just forget because its not obvious enough.. What I did since Im not a coder, was to change the translation file.

"RetakeSiteMessage"
{
    "#format"       "{1:s},{2:d},{3:d}"
    "en"            "::::: RETAKE BOMBSPOT {MOSS_GREEN}{1} {NORMAL}::::: {LIGHT_RED}{2} Ts {NORMAL}vs {LIGHT_BLUE}{3} CTs"
}

Its a bit better but a hintmessage would be best.

BrutalCSEjziponken avatar Feb 12 '15 22:02 BrutalCSEjziponken

I would propose https://github.com/data-bomb/csgo-retakes/commit/f9196953b7961a4501fb9fa24519285e28ab26fa as one possible solution for this enhancement request.

data-bomb avatar Dec 20 '15 18:12 data-bomb

Looks pretty good. Any chance of getting a screenshot of how it looks in-game?

splewis avatar Dec 20 '15 20:12 splewis

I'm not a very good artist, but here are some screenshots from in-game:

de_inferno0010 de_inferno0011

data-bomb avatar Dec 20 '15 20:12 data-bomb

oh wow thats looks really good.

BrutalCSEjziponken avatar Dec 20 '15 20:12 BrutalCSEjziponken

Seems a little excessive to me

RavageCS avatar Dec 20 '15 21:12 RavageCS

No, its really not. Ive been getting complaints about this problem ever since we started our servers. Even I noticed that I sometimes ran to the wrong site. xD

BrutalCSEjziponken avatar Dec 20 '15 22:12 BrutalCSEjziponken

It's possible to make it smaller. An overlay is something that's highly customizable but you just can't have too many because it's an extra download for the clients. It's an additional option to the problem as is a Hint box, different coloring, or additional chat messages. Certainly not for everyone, which is why it runs through the API as a separate plugin.

data-bomb avatar Dec 20 '15 22:12 data-bomb

A little off topic, but can you make an overlay show once when players connect to the server and join a team? Like an advertisement plugin?

BrutalCSEjziponken avatar Dec 20 '15 22:12 BrutalCSEjziponken

I know the overlay file itself is set by a cvar, but I think it's too large for my tastes to include here. If it were smaller I'd be fine to include it (and disabled by default).

splewis avatar Jan 03 '16 23:01 splewis

I've removed the plugin on my server because some people said they saw a black screen instead of the overlay, and I'm not sure why since it works for me and I'm not an overlay expert.

data-bomb avatar Jan 05 '16 14:01 data-bomb

@data-bomb hey databomb I tried to add the siteannouncer and the bombhelper but for some reason they don't work for me, could you help me by any chance?

jinnnnnnnn avatar Feb 12 '16 09:02 jinnnnnnnn

jinn, this is pretty vague description so I can't help you much. You need to do the basic stuff you'd do for all plugins-- compile the SP file and put the SMX in the correct directory. The only extra part particular to this one is that the overlays need to go on the server directory and FastDL server, if you have a FastDL server. If you post a step-by-step guide to what you did then maybe one of us can point out your issue.

data-bomb avatar Feb 15 '16 12:02 data-bomb

I've tried to put that After MessageToALL but the hint shows only when someone plant the bomb or when the freezetime ends. Have it some way to put the hintmessage when it's on the freezetime?

I've tried to put that After MessageToALL but the hint shows only when someone plant the bomb or when the freezetime ends. Have it some way to put the hintmessage when it's on the freezetime?

maybe take a look at this: https://github.com/shanapu/retake-overlays / https://forums.alliedmods.net/showthread.php?t=298249 It shows the overlay as soon as the bombsite is picked by retake plugin.

shanapu avatar May 08 '18 23:05 shanapu

I've updated https://github.com/b3none/retakes-hud so that it is generic and will work alongside splewis' plugin as well as others. If you're feeling extra nice then you could also star the repo as it goes a really long way :+1:

B3none avatar Mar 22 '19 13:03 B3none