ModSharp.GameHUD.Shared 1.0.2

dotnet add package ModSharp.GameHUD.Shared --version 1.0.2
                    
NuGet\Install-Package ModSharp.GameHUD.Shared -Version 1.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ModSharp.GameHUD.Shared" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ModSharp.GameHUD.Shared" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="ModSharp.GameHUD.Shared" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ModSharp.GameHUD.Shared --version 1.0.2
                    
#r "nuget: ModSharp.GameHUD.Shared, 1.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ModSharp.GameHUD.Shared@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ModSharp.GameHUD.Shared&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=ModSharp.GameHUD.Shared&version=1.0.2
                    
Install as a Cake Tool

[Core]MS-GameHUD

API for displaying messages to the player. GameText analogue

Required packages:

  1. ModSharp

Installation:

  1. Compile or copy MS-GameHUD to sharp/modules/MS-GameHUD folger
  2. Compile or copy MS-GameHUD-Shared to sharp/shared/MS-GameHUD-Shared folger
  3. Restart server

CVARs(temporarily, maybe there is a better method):

Cvar Parameter Description
ms_gamehud_method <0/1> true - point_orient, false - teleport

Example:

Add the dependency MS-GameHUD to your project:

using MS_GameHUD_Shared;
using static MS_GameHUD_Shared.IGameHUDAPI;

<My plugin class>: IModSharpModule
{
	<...>
	public void OnAllModulesLoaded() => GetGameHUD();
	public void OnLibraryConnected(string name)
	{
		if (name.Equals("GameHUD")) GetGameHUD();
	}
	public void OnLibraryDisconnect(string name)
	{
		if (name.Equals("GameHUD")) _igamehud = null;
	}
	private IModSharpModuleInterface<IGameHUDAPI>? _igamehud;
	private IGameHUDAPI? GetGameHUD()
	{
		if (_igamehud?.Instance is null) _igamehud = _modules.GetOptionalSharpModuleInterface<IGameHUDAPI>(IGameHUDAPI.Identity);
		return _igamehud?.Instance;
	}
	<...>
}

Using API function. Description of parameters see in source code MS-GameHUD-Shared

public void MyExampleFunc(IPlayerController? player)
{
	<...>
	if (player.IsValid() && GetGameHUD() is { } _api)
	{
		<...>
		_api.Native_GameHUD_SetParams(player, 0, new(20, 20, 80), new(255, 0, 0, 255));
		_api.Native_GameHUD_Show(player, 0, "MyMessage", 10.0f);
		<...>
		_api.Native_GameHUD_Remove(player, 0);
		<...>
	}
	<...>
}

Screenshot

20251123094254_1

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 215 11/23/2025
1.0.1 173 11/23/2025