splewis / csgo-retakes

CS:GO Sourcemod plugin for a site-retake gamemode
GNU General Public License v3.0
328 stars 115 forks source link

HUD message indicating which site to retake #4

Open xPaw opened 9 years ago

xPaw commented 9 years ago

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

sinistersnare commented 9 years ago

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.

splewis commented 9 years ago

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 commented 9 years ago

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

for each client.

Ejz85 commented 9 years ago

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.

data-bomb commented 8 years ago

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

splewis commented 8 years ago

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

data-bomb commented 8 years ago

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

de_inferno0010 de_inferno0011

Ejz85 commented 8 years ago

oh wow thats looks really good.

RavageCS commented 8 years ago

Seems a little excessive to me

Ejz85 commented 8 years ago

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

data-bomb commented 8 years ago

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.

Ejz85 commented 8 years ago

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?

splewis commented 8 years ago

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).

data-bomb commented 8 years ago

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.

jinnnnnnnn commented 8 years ago

@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?

data-bomb commented 8 years ago

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.

Rafael-Leal-Prada-dos-Santos commented 6 years ago

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?

shanapu commented 6 years ago

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.

B3none commented 5 years ago

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: