agmodx icon indicating copy to clipboard operation
agmodx copied to clipboard

Explore how to query CVars from players to enable certain features

Open rtxa opened this issue 3 years ago • 0 comments

One of the reasons to implement this feature is too see if players have available color codes in chat by querying aghl_version.

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

rtxa avatar Jan 23 '23 17:01 rtxa