rtxa / agmodx

AG Mod X is an improved Mini AG alternative made as a plugin for AMX Mod X from the ground. It's easy to add new stuff, make improvements, do changes, etc.
GNU General Public License v3.0
22 stars 9 forks source link

HTML MOTD support #19

Closed Mehmet-I closed 1 year ago

Mehmet-I commented 2 years ago

Hello,

Can you add HTML MOTD support.

Thank you for your work.

rtxa commented 2 years ago

Hi Mehmet, thanks 😃

I think this feature is out of the scope for this project. Anyway, I need to explore this myself to see if this is achievable, but I'm letting you know that this is not my biggest priority (work, other projects). I think this can be achieved using an external AMXX plugin, if the player connected has BugfixedHL by tmp64, then show HTML MOTD instead. The issue here is how we know the player is using that custom HL client 🤔

rtxa commented 2 years ago

According to https://github.com/tmp64/BugfixedHL-Rebased/wiki/HTML-and-Unicode-MOTD

  1. Enable sv_bhl_query_vars. This will enable querying of aghl_supports client cvar to determine which MOTDs are supported.
  2. If the server supports old p47 clients (like NGHL), enable sv_bhl_query_wait_for_id to prevent them from being kicked with svc_bad error.
  3. Enable sv_bhl_defer_motd. It will defer sending of MOTD until after query response was received. It may delay showing of the MOTD dialog but usually query response arrives before client is fully loaded so there are no issues with that.

Basically, looks like this is achievable with just using AMXX, my biggest concern was how to know if the player is using BHL without crashing the client if he was using an old client (p47). Using the old-api should workaround the issue. Still requires some work to do it and it's out of scope for this project.