summaryrefslogtreecommitdiff
path: root/source/sourcemod/scripting/gokz-hud/natives.sp
diff options
context:
space:
mode:
authoraura <nw@moneybot.cc>2026-02-17 23:42:09 +0100
committeraura <nw@moneybot.cc>2026-02-17 23:42:09 +0100
commit5e2eb7d67ae933b7566f1944d0bb7744da03d586 (patch)
tree054acff1113270a9cd07933df760f3768c1b6853 /source/sourcemod/scripting/gokz-hud/natives.sp
parent341db13a008dc12bb22ceb50452d93d01476308c (diff)
move source stuff to its own folder
Diffstat (limited to 'source/sourcemod/scripting/gokz-hud/natives.sp')
-rw-r--r--source/sourcemod/scripting/gokz-hud/natives.sp33
1 files changed, 33 insertions, 0 deletions
diff --git a/source/sourcemod/scripting/gokz-hud/natives.sp b/source/sourcemod/scripting/gokz-hud/natives.sp
new file mode 100644
index 0000000..bb877e2
--- /dev/null
+++ b/source/sourcemod/scripting/gokz-hud/natives.sp
@@ -0,0 +1,33 @@
+void CreateNatives()
+{
+ CreateNative("GOKZ_HUD_ForceUpdateTPMenu", Native_ForceUpdateTPMenu);
+ CreateNative("GOKZ_HUD_GetMenuShowing", Native_GetMenuShowing);
+ CreateNative("GOKZ_HUD_SetMenuShowing", Native_SetMenuShowing);
+ CreateNative("GOKZ_HUD_GetMenuSpectatorText", Native_GetSpectatorText);
+}
+
+public int Native_ForceUpdateTPMenu(Handle plugin, int numParams)
+{
+ SetForceUpdateTPMenu(GetNativeCell(1));
+ return 0;
+}
+
+public int Native_GetMenuShowing(Handle plugin, int numParams)
+{
+ return view_as<int>(gB_MenuShowing[GetNativeCell(1)]);
+}
+
+public int Native_SetMenuShowing(Handle plugin, int numParams)
+{
+ gB_MenuShowing[GetNativeCell(1)] = view_as<bool>(GetNativeCell(2));
+ return 0;
+}
+
+public int Native_GetSpectatorText(Handle plugin, int numParams)
+{
+ HUDInfo info;
+ GetNativeArray(2, info, sizeof(HUDInfo));
+ KZPlayer player = KZPlayer(GetNativeCell(1));
+ FormatNativeString(3, 0, 0, GetNativeCell(4), _, "", FormatSpectatorTextForMenu(player, info));
+ return 0;
+} \ No newline at end of file