From aef0d1c1268ab7d4bc18996c9c6b4da16a40aadc Mon Sep 17 00:00:00 2001 From: navewindre Date: Mon, 4 Dec 2023 18:06:10 +0100 Subject: bbbbbbbbwaaaaaaaaaaa --- sourcemod/scripting/gokz-hud/natives.sp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 sourcemod/scripting/gokz-hud/natives.sp (limited to 'sourcemod/scripting/gokz-hud/natives.sp') diff --git a/sourcemod/scripting/gokz-hud/natives.sp b/sourcemod/scripting/gokz-hud/natives.sp new file mode 100644 index 0000000..bb877e2 --- /dev/null +++ b/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(gB_MenuShowing[GetNativeCell(1)]); +} + +public int Native_SetMenuShowing(Handle plugin, int numParams) +{ + gB_MenuShowing[GetNativeCell(1)] = view_as(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 -- cgit v1.2.3