| ClearSyncHud | Clears the text on a synchronized HUD channel.
This is not the same as sending "" because it guarantees that it won't
overwrite text on another channel. For example, consider the scenario:
1. Your synchronized message goes to channel 3.
2. Someone else's non-synchronized message goes to channel 3.
If you were to simply send "" on your synchronized message,
then someone else's text could be overwritten. |
| CreateDialog | Creates different types of ingame messages.
Note: On many newer games (Left 4 Dead/2008+), the display of this to clients is broken.
Additionally, as of 2018, some games also require the client to have cl_showpluginmessages
set to 1, a non-default value, for this to function. |
| CreateHudSynchronizer | Creates a HUD synchronization object. This object is used to automatically assign and
re-use channels for a set of messages.
The HUD has a hardcoded number of channels (usually 6) for displaying
text. You can use any channel for any area of the screen. Text on
different channels can overlap, but text on the same channel will
erase the old text first. This overlapping and overwriting gets problematic.
A HUD synchronization object automatically selects channels for you based on
the following heuristics:
- If channel X was last used by the object, and hasn't been modified again,
channel X gets re-used.
- Otherwise, a new channel is chosen based on the least-recently-used channel.
This ensures that if you display text on a sync object, that the previous text
displayed on it will always be cleared first. This is because your new text
will either overwrite the old text on the same channel, or because another
channel has already erased your text.
Note that messages can still overlap if they are on different synchronization
objects, or they are displayed to manual channels.
These are particularly useful for displaying repeating or refreshing HUD text, in
addition to displaying multiple message sets in one area of the screen (for example,
center-say messages that may pop up randomly that you don't want to overlap each
other). |
| DisplayAskConnectBox | Displays a panel asking the client to connect to a specified IP.
Note: On many newer games (Left 4 Dead/2008+), the display of this to clients is broken.
Additionally, as of 2018, some games also require the client to have cl_showpluginmessages
set to 1, a non-default value, for this to function. |
| EntIndexToEntRef | Converts an entity index into a serial encoded entity reference. |
| EntRefToEntIndex | Retrieves the entity index from a reference or validates an entity index.
The input ref is checked that it is still valid and refers to the same entity. |
| FindMap | Returns whether a full or partial map name is found or can be resolved |
| GetClientsInRange | Find clients that are potentially in range of a position. |
| GetCurrentMap | Returns the current map name. |
| GetEngineTime | Returns a high-precision time value for profiling the engine. |
| GetEngineVersion | Gets the engine version that the currently-loaded SM core was compiled against.
The engine version values are not guaranteed to be in any particular order,
and should only be compared by (in)equality. |
| GetGameDescription | Returns the game description from the mod. |
| GetGameFolderName | Returns the name of the game's directory. |
| GetGameFrameTime | Returns the time the Game took processing the last frame. |
| GetGameTickCount | Returns the game's internal tick count. |
| GetGameTime | Returns the game time based on the game tick. |
| GetMapDisplayName | Get the display name of a workshop map.
Note: You do not need to call FindMap first. This native will call FindMap internally. |
| GetRandomFloat | Returns a random floating point number from the Half-Life 2 Random Stream. |
| GetRandomInt | Returns a random number from the Half-Life 2 Random Stream. |
| GetServerAuthId | Retrieves the server's authentication string (SteamID).
Note: If called before server is connected to Steam, auth id
will be invalid ([I:0:1], 1, etc.) |
| GetServerSteamAccountId | Returns the server's Steam account ID. |
| GuessSDKVersion | |
| IsDecalPrecached | Returns if a given decal is precached. |
| IsDedicatedServer | Returns whether the server is dedicated. |
| IsGenericPrecached | Returns if a given generic file is precached. |
| IsMapValid | Returns whether a map is valid or not. |
| IsModelPrecached | Returns if a given model is precached. |
| IsSoundPrecached | |
| LogToGame | Logs a generic message to the HL2 logs. |
| MakeCompatEntRef | Converts a reference into a backwards compatible version. |
| PrecacheDecal | Precaches a given decal. |
| PrecacheGeneric | Precaches a given generic file. |
| PrecacheModel | Precaches a given model. |
| PrecacheSentenceFile | Precaches a given sentence file. |
| PrecacheSound | Precaches a given sound. |
| PrintCenterText | Prints a message to a specific client in the center of the screen. |
| PrintCenterTextAll | Prints a message to all clients in the center of the screen. |
| PrintHintText | Prints a message to a specific client with a hint box. |
| PrintHintTextToAll | Prints a message to all clients with a hint box. |
| PrintToChat | Prints a message to a specific client in the chat area. |
| PrintToChatAll | Prints a message to all clients in the chat area. |
| SetHudTextParams | Sets the HUD parameters for drawing text. These parameters are stored
globally, although nothing other than this function and SetHudTextParamsEx
modify them.
You must call this function before drawing text. If you are drawing
text to multiple clients, you can set the parameters once, since
they won't be modified. However, as soon as you pass control back
to other plugins, you must reset the parameters next time you draw. |
| SetHudTextParamsEx | Sets the HUD parameters for drawing text. These parameters are stored
globally, although nothing other than this function and SetHudTextParams
modify them.
This is the same as SetHudTextParams(), except it lets you set the alternate
color for when effects require it. |
| SetRandomSeed | Sets the seed value for the global Half-Life 2 Random Stream. |
| ShowHudText | Shows a HUD message to a client on the given channel.
Note: while many games support HUD Text, not all do. |
| ShowMOTDPanel | Shows a MOTD panel to a specific client. |
| ShowSyncHudText | Shows a synchronized HUD message to a client.
As of this writing, only TF, HL2MP, and SourceForts support HUD Text. |
| ShowVGUIPanel | Shows a VGUI panel to a specific client. |