Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <wchar.h>
- #include <sys/prx.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <sys/syscall.h>
- #include <sys/ppu_thread.h>
- #include <string.h>
- #include <cstring>
- #include <sys/sys_time.h>
- #include <sys/time_util.h>
- #include <stdarg.h>
- #include <assert.h>
- #include <sys/process.h>
- #include <sys/memory.h>
- #include <sys/timer.h>
- #include <sys/return_code.h>
- #include <sys/prx.h>
- #include <stddef.h>
- #include <math.h>
- #include <stdarg.h>
- #include <cellstatus.h>
- #include <typeinfo>
- #include <vector>
- #include <pthread.h>
- #include <locale.h>
- #include <cell/error.h>
- #include <sys/paths.h>
- #include <time.h>
- SYS_MODULE_INFO( Mw2SPRX, 0, 1, 1);
- SYS_MODULE_START( _Mw2SPRX_prx_entry );
- SYS_LIB_DECLARE_WITH_STUB( LIBNAME, SYS_LIB_AUTO_EXPORT, STUBNAME );
- SYS_LIB_EXPORT( _Mw2SPRX_export_function, LIBNAME );
- sys_ppu_thread_t mw2menu;
- sys_ppu_thread_t NewsBarThread;
- //Dont Worry About This Shit
- int Scroll[18];
- int MaxScroll[18];
- char* SubName = "Main Menu";
- char* TitleText[18];
- char* OptionText[18];
- int MainScroll[18];
- int SubScroll[18];
- void sleep(usecond_t time) //1 second = 1000
- {
- sys_timer_usleep(time * 1000);
- }
- sys_ppu_thread_t create_thread(void (*entry)(uint64_t), int priority, size_t stacksize, const char* threadname,sys_ppu_thread_t id)
- {
- if(sys_ppu_thread_create(&id, entry, 0, priority , stacksize, 0, threadname) == CELL_OK)
- {
- //console_write("\n\n Mw2_Menu_Loaded!\n\n");
- }
- return id;
- }
- struct opd_s
- {
- uint32_t sub;
- uint32_t toc;
- };
- namespace Huds
- {
- union color_s
- {
- struct
- {
- int8_t r;
- int8_t g;
- int8_t b;
- int8_t a;
- };
- int32_t rgba;
- };
- int G_LocalizedStringIndex(const char* Text)
- {
- int(*LocalizedStringIndex)(const char* Text) = (int(*)(const char*))0x00708080;
- return LocalizedStringIndex(Text);
- }
- struct hudelem_s
- {
- int type; // 0x00-0x04
- float y; // 0x04-0x08
- float x; // 0x08-0x0C
- float z; // 0x0C-0x10
- int targetEntNum; // 0x10-0x14
- float fontScale; // 0x14-0x18
- float fromFontScale; // 0x18-0x1C
- int fontScaleStartTime; // 0x1C-0x20
- int fontScaleTime; // 0x20-0x24
- int label; // 0x24-0x28
- int font; // 0x28-0x2C
- int alignOrg; // 0x2C-0x30
- int alignScreen; // 0x30-0x34
- color_s color; // 0x34-0x38
- color_s fromColor; // 0x38-0x3C
- int fadeStartTime; // 0x3C-0x40
- int fadeTime; // 0x40-0x44
- int height; // 0x44-0x48
- int width; // 0x48-0x4C
- int materialIndex; // 0x4C-0x50
- int fromHeight; // 0x50-0x54
- int fromWidth; // 0x54-0x58
- int scaleStartTime; // 0x58-0x5C
- int scaleTime; // 0x5C-0x60
- float fromY; // 0x60-0x64
- float fromX; // 0x64-0x68
- int fromAlignOrg; // 0x68-0x6C
- int fromAlignScreen; // 0x6C-0x70
- int moveStartTime; // 0x70-0x74
- int moveTime; // 0x74-0x78
- float value; // 0x78-0x7C
- int time; // 0x7C-0x80
- int duration; // 0x80-0x84
- int text; // 0x84-0x88
- float sort; // 0x88-0x8C
- color_s glowColor; // 0x8C-0x90
- int fxBirthTime; // 0x90-0x94
- int fxLetterTime; // 0x94-0x98
- int fxDecayStartTime; // 0x98-0x9C
- int fxDecayDuration; // 0x9C-0xA0
- int soundID; // 0xA0-0xA4
- int flags; // 0xA4-0xA8
- };
- struct game_hudelem_s
- {
- hudelem_s elem;
- long clientNum;
- long team;
- long archived;
- };
- opd_s GMI = { 0x001BE758, 0x00724C38 };
- int(*GetMaterialIndex)(const char* Material) = (int(*)(const char*))&GMI;
- opd_s HEA = { 0x001806E0, 0x00724C38 };
- game_hudelem_s*(*HudElemAlloc)(int32_t client, int32_t teamNum) = (game_hudelem_s*(*)(int32_t, int32_t))&HEA;
- opd_s Destroy = { 0x00182660, 0x00724C38 };
- game_hudelem_s*(*HudElem_Free)(game_hudelem_s *hud) = (game_hudelem_s*(*)(game_hudelem_s*))&Destroy;
- void setFlagForeground(game_hudelem_s * elem)
- {
- elem->elem.flags |= 0x01;
- }
- color_s White()
- {
- color_s color;
- color.r = 255; color.g = 255; color.b = 255; color.a = 255;
- return color;
- }
- game_hudelem_s* setShader(int clientIndex, const char* Shader, int Width, int Height, float X, float Y, int Allign = 5, unsigned char R = 0, unsigned char G = 0, unsigned char B = 0, unsigned char A = 0)
- {
- *(int*)0x131689C = 1; //Allows to use precached Shaders
- game_hudelem_s* elem = HudElemAlloc(clientIndex, 0);
- elem->clientNum = clientIndex;
- elem->elem.type = 6;
- elem->elem.materialIndex = GetMaterialIndex(Shader);
- elem->elem.width = Width;
- elem->elem.height = Height;
- elem->elem.x = X;
- elem->elem.y = Y;
- elem->elem.alignOrg = Allign;
- elem->elem.color.r = R;
- elem->elem.color.g = G;
- elem->elem.color.b = B;
- elem->elem.color.a = A;
- return elem;
- }
- game_hudelem_s* setText(int clientIndex, const char* Text, int Font, float FontScale, float X, float Y, int Allign, unsigned char R = 0, unsigned char G = 0, unsigned char B = 0, unsigned char A = 0,unsigned char glowR = 0, unsigned char glowG = 0, unsigned char glowB = 0, unsigned char glowA = 0)
- {
- *(int*)0x131689C = 1;
- game_hudelem_s* elem = HudElemAlloc(clientIndex, 0);
- elem->clientNum = clientIndex;
- elem->elem.type = 1;
- elem->elem.text = G_LocalizedStringIndex(Text);
- elem->elem.font = Font;
- elem->elem.fontScale = FontScale;
- elem->elem.x = X;
- elem->elem.y = Y;
- elem->elem.alignOrg = Allign;
- elem->elem.alignScreen = 6;
- elem->elem.color.r = R;
- elem->elem.color.g = G;
- elem->elem.color.b = B;
- elem->elem.color.a = A;
- elem->elem.glowColor.r = glowR;
- elem->elem.glowColor.g = glowG;
- elem->elem.glowColor.b = glowB;
- elem->elem.glowColor.a = glowA;
- return elem;
- }
- void moveOverTime(game_hudelem_s * elem, float time, float X, float Y)
- {
- int * levelTime = (int*)0x0012E0304;
- elem->elem.moveStartTime = *levelTime;
- elem->elem.fromAlignOrg = elem->elem.alignOrg;
- elem->elem.fromAlignScreen = elem->elem.alignScreen;
- elem->elem.fromX = elem->elem.x;
- elem->elem.fromY = elem->elem.y;
- elem->elem.x = X;
- elem->elem.y = Y;
- elem->elem.moveTime = (int)floor(time * 1000 + 0.5);
- }
- void MoveShaderXY(game_hudelem_s* elem, float X, float Y)
- {
- elem->elem.x = X;
- elem->elem.y = Y;
- }
- void fadeOverTime(game_hudelem_s * elem, float time, unsigned char R = 0, unsigned char G = 0, unsigned char B = 0, unsigned char A = 0)
- {
- *(int*)0x131689C = 1;
- int * levelTime = (int*)0x0012E0304;
- elem->elem.fadeStartTime = *levelTime;
- elem->elem.fromColor = elem->elem.color;
- elem->elem.color.r = R;
- elem->elem.color.g = G;
- elem->elem.color.b = B;
- elem->elem.color.a = A;
- elem->elem.fadeTime = (int)floor(time * 1000 + 0.5);
- }
- void scaleOverTimeShader(game_hudelem_s * elem, float time, int width, int height)
- {
- int * levelTime = (int*)0x0012E0304;
- elem->elem.scaleStartTime = *levelTime;
- elem->elem.fromWidth = elem->elem.width;
- elem->elem.fromHeight = elem->elem.height;
- elem->elem.width = width;
- elem->elem.height = height;
- elem->elem.scaleTime = (int)floor(time * 1000 + 0.5);
- }
- void scaleOverTimeText(game_hudelem_s * elem, float time, float fontScale)
- {
- int * levelTime = (int*)0x0012E0304;
- elem->elem.fontScaleStartTime = *levelTime;
- elem->elem.fromFontScale = elem->elem.fontScale;
- elem->elem.fontScale = fontScale;
- elem->elem.fontScaleTime = (int)floor(time * 1000 + 0.5);
- }
- void setPulseFx(game_hudelem_s * elem, int speed, int decayStart, int decayDuration )
- {
- int * levelTime = (int*)0x0012E0304;
- elem->elem.fxBirthTime = *levelTime;
- elem->elem.fxLetterTime = speed;
- elem->elem.fxDecayStartTime = decayStart;
- elem->elem.fxDecayDuration = decayDuration;
- }
- void ChangeText(Huds::game_hudelem_s * elem, char* newText)
- {
- elem->elem.text = Huds::G_LocalizedStringIndex(newText);
- }
- };
- Huds::game_hudelem_s* Background[18];
- Huds::game_hudelem_s* Title[18];
- Huds::game_hudelem_s* MenuTitle[18];
- Huds::game_hudelem_s* Options[18];
- Huds::game_hudelem_s* LeftBar[18];
- Huds::game_hudelem_s* RightBar[18];
- Huds::game_hudelem_s* Scroller[18];
- Huds::game_hudelem_s* Icon[18];
- Huds::game_hudelem_s* CreatedBy[18];
- namespace TOC_Calls
- {
- opd_s SV_GameSendServerCommand_t = { 0x0021A0A0, 0x00724C38 };
- void(*SV_GameSendServerCommand)(int clientIndex, int type, const char* Command) = (void(*)(int, int, const char*))&SV_GameSendServerCommand_t;
- opd_s Dvar_GetBoolAddress = { 0x00277138, 0x00724C38 };
- bool(*Dvar_GetBool)(const char *dvarName) = (bool(*)(const char*))&Dvar_GetBoolAddress;
- opd_s cBuff_AddText_t = { 0x001D9EC0, 0x00724C38 };
- void(*cBuff_AddText)(int localClientIndex, const char* Command) = (void(*)(int, const char*))&cBuff_AddText_t;
- };
- namespace Variables
- {
- Huds::game_hudelem_s* SetShader[18];
- Huds::game_hudelem_s* SetText[18];
- bool MenuStarted;
- bool IsHost;
- int Scroll[18];
- int MaxScroll[18];
- int MenuType[18];
- char* CurMenu[18];
- char* SubName = "Main Menu";
- bool MenuOpen[18];
- char* PreviousMenu[18];
- char* PreviousMenu2[18];
- char* GetNewsText = "Welcome To Menu Base || Created By: oStankyModz || www.YouTube.com/StankyModzHD || Enjoy!!";
- };
- char* getName(int client)
- {
- if(*(int*)0x21910670 + client * 14080 != 0)
- {
- return (char*)(0x21910670 + client * 14080);
- }
- else
- {
- return "Not Ingame";
- }
- }
- int getLocalName()
- {
- return (0x01f9f11c);
- }
- int getPlayerName(int client)
- {
- return (0x14E5408 + (client * 0x3700));
- }
- int HostClientNumber = 0;
- int getHostClientNumber()
- {
- for (int i = 0; i < 18; i++)
- {
- if (!strcmp((char*)getLocalName(), (char*)getPlayerName(i)))
- {
- return i;
- }
- }
- return 0;
- }
- //End
- //Buttons
- namespace Buttons
- {
- char* Cross = "+gostand";
- char* Circle = "+stance";
- char* Triangle = "weapnext";
- char* Square = "+usereload";
- char* R3 = "+melee";
- char* R2 = "+frag";
- char* R1 = "+attack";
- char* L3 = "+breath_sprint";
- char* L2 = "+smoke";
- char* L1 = "+speed_throw";
- char* Select = "togglescores";
- char* Start = "togglemenu";
- char* DpadUp = "+actionslot 1";
- char* DpadDown = "+actionslot 2";
- char* DpadRight = "+actionslot 4";
- char* DpadLeft = "+actionslot 3";
- };
- int sweg(int clientIndex)
- {
- return *(int*)0x1BF911C + (clientIndex * 0x97F80);
- }
- bool ButtonPressed(int clientIndex, const char* Button)
- {
- return !strcmp((char*)sweg(clientIndex)+ 0x20E9F, Button);
- }
- //Button End
- //Menu Base Below
- int GetMenuInfo(int client, char* Menu)
- {
- if(Menu == SubName)
- {
- TitleText[client] = SubName;//creates the text for the title of that menu
- OptionText[client] = "Sub Menu 1\nSub Menu 2\nSub Menu 3\nSub Menu 4\nSub Menu 5\nSub Menu 6\nSub Menu 7\nSub Menu 8\nSub Menu 9\nSub Menu 10\nSub Menu 11\nSub Menu 12\nSub Menu 13\nSub Menu 14\nSub Menu 15";//creats the text in the menu
- return 14;//Returns the maximum scroll
- }
- else if(Menu == "Sub Menu 1")
- {
- TitleText[client] = "Sub Menu 1";
- OptionText[client] = "God Mode\nNo Clip\nOption 3\nOption 4\nOption 5\nOption 6\nOption 7\nOption 8\nOption 9\nOption 10\nOption 11\nOption 12\nOption 13\nOption 14\nOption 15";
- return 14;
- }
- else if(Menu == "Sub Menu 2")
- {
- TitleText[client] = "Sub Menu 2";
- OptionText[client] = "Option 1\nOption 2\nOption 3\nOption 4\nOption 5\nOption 6\nOption 7\nOption 8\nOption 9\nOption 10\nOption 11\nOption 12\nOption 13\nOption 14\nOption 15";
- return 14;
- }
- else if(Menu == "Sub Menu 3")
- {
- TitleText[client] = "Sub Menu 3";
- OptionText[client] = "Option 1\nOption 2\nOption 3\nOption 4\nOption 5\nOption 6\nOption 7\nOption 8\nOption 9\nOption 10\nOption 11\nOption 12\nOption 13\nOption 14\nOption 15";
- return 14;
- }
- else if(Menu == "Sub Menu 4")
- {
- TitleText[client] = "Sub Menu 4";
- OptionText[client] = "Option 1\nOption 2\nOption 3\nOption 4\nOption 5\nOption 6\nOption 7\nOption 8\nOption 9\nOption 10\nOption 11\nOption 12\nOption 13\nOption 14\nOption 15";
- return 14;
- }
- else if(Menu == "Sub Menu 5")
- {
- TitleText[client] = "Sub Menu 5";
- OptionText[client] = "Option 1\nOption 2\nOption 3\nOption 4\nOption 5\nOption 6\nOption 7\nOption 8\nOption 9\nOption 10\nOption 11\nOption 12\nOption 13\nOption 14\nOption 15";
- return 14;
- }
- else if(Menu == "Sub Menu 6")
- {
- TitleText[client] = "Sub Menu 6";
- OptionText[client] = "Option 1\nOption 2\nOption 3\nOption 4\nOption 5\nOption 6\nOption 7\nOption 8\nOption 9\nOption 10\nOption 11\nOption 12\nOption 13\nOption 14\nOption 15";
- return 14;
- }
- else if(Menu == "Sub Menu 7")
- {
- TitleText[client] = "Sub Menu 7";
- OptionText[client] = "Option 1\nOption 2\nOption 3\nOption 4\nOption 5\nOption 6\nOption 7\nOption 8\nOption 9\nOption 10\nOption 11\nOption 12\nOption 13\nOption 14\nOption 15";
- return 14;
- }
- else if(Menu == "Sub Menu 8")
- {
- TitleText[client] = "Sub Menu 8";
- OptionText[client] = "Option 1\nOption 2\nOption 3\nOption 4\nOption 5\nOption 6\nOption 7\nOption 8\nOption 9\nOption 10\nOption 11\nOption 12\nOption 13\nOption 14\nOption 15";
- return 14;
- }
- else if(Menu == "Sub Menu 9")
- {
- TitleText[client] = "Sub Menu 9";
- OptionText[client] = "Option 1\nOption 2\nOption 3\nOption 4\nOption 5\nOption 6\nOption 7\nOption 8\nOption 9\nOption 10\nOption 11\nOption 12\nOption 13\nOption 14\nOption 15";
- return 14;
- }
- else if(Menu == "Sub Menu 10")
- {
- TitleText[client] = "Sub Menu 10";
- OptionText[client] = "Option 1\nOption 2\nOption 3\nOption 4\nOption 5\nOption 6\nOption 7\nOption 8\nOption 9\nOption 10\nOption 11\nOption 12\nOption 13\nOption 14\nOption 15";
- return 14;
- }
- else if(Menu == "Sub Menu 11")
- {
- TitleText[client] = "Sub Menu 11";
- OptionText[client] = "Option 1\nOption 2\nOption 3\nOption 4\nOption 5\nOption 6\nOption 7\nOption 8\nOption 9\nOption 10\nOption 11\nOption 12\nOption 13\nOption 14\nOption 15";
- return 14;
- }
- else if(Menu == "Sub Menu 12")
- {
- TitleText[client] = "Sub Menu 12";
- OptionText[client] = "Option 1\nOption 2\nOption 3\nOption 4\nOption 5\nOption 6\nOption 7\nOption 8\nOption 9\nOption 10\nOption 11\nOption 12\nOption 13\nOption 14\nOption 15";
- return 14;
- }
- else if(Menu == "Sub Menu 13")
- {
- TitleText[client] = "Sub Menu 13";
- OptionText[client] = "Option 1\nOption 2\nOption 3\nOption 4\nOption 5\nOption 6\nOption 7\nOption 8\nOption 9\nOption 10\nOption 11\nOption 12\nOption 13\nOption 14\nOption 15";
- return 14;
- }
- else if(Menu == "Sub Menu 14")
- {
- TitleText[client] = "Sub Menu 14";
- OptionText[client] = "Option 1\nOption 2\nOption 3\nOption 4\nOption 5\nOption 6\nOption 7\nOption 8\nOption 9\nOption 10\nOption 11\nOption 12\nOption 13\nOption 14\nOption 15";
- return 14;
- }
- else if(Menu == "Sub Menu 15")
- {
- TitleText[client] = "Sub Menu 15";
- OptionText[client] = "Option 1\nOption 2\nOption 3\nOption 4\nOption 5\nOption 6\nOption 7\nOption 8\nOption 9\nOption 10\nOption 11\nOption 12\nOption 13\nOption 14\nOption 15";
- return 14;
- }
- else
- {
- TitleText[client] = "Error";
- OptionText[client] = "Error";
- return 0;
- }
- }
- //Menu Base Huds
- void StoreHuds(int client)
- {
- Background[client] = Huds::setShader(client, "white", 250, 600, -500, 0, 0, 0, 0, 0, 150);//Background
- LeftBar[client] = Huds::setShader(client, "white", 2, 600, 198, 999, 0, 0, 0, 255, 255);//Left Bar
- RightBar[client] = Huds::setShader(client, "white", 2, 600, 450, 999, 0, 0, 0, 255, 255);//Right Bar
- Scroller[client] = Huds::setShader(client, "white", 250, 18, -500, 0, 0, 0, 0, 0, 255);//Scroller
- MenuTitle[client] = Huds::setText(client, "Menu Base", 1, 1.4, -500, 130, 5, 255, 255, 255, 255, 0, 0, 255, 255);//Menu Title
- CreatedBy[client] = Huds::setText(client, "Created By: oStankyModz", 1, 0.5, -500, 130, 5, 255, 255, 255, 255, 0, 0, 255, 255);//Menu Title
- Title[client] = Huds::setText(client, "Main Menu", 1, 1, -500, 130, 5, 255, 255, 255, 255, 0, 0, 255, 255);//Menu Title
- Options[client] = Huds::setText(client, " ", 5, 1.6, 300, 190, 5, 255, 255, 255, 255, 0, 0, 0, 255);//Option Text
- }
- void LoadHuds(int client)
- {
- MaxScroll[client] = GetMenuInfo(client, SubName);
- Huds::ChangeText(Title[client], TitleText[client]);
- Huds::ChangeText(Options[client], OptionText[client]);
- Huds::moveOverTime(Background[client], 0.50, 200, 0);//Background
- Huds::moveOverTime(LeftBar[client], 0.50, 198, 0);//Left Bar
- Huds::moveOverTime(RightBar[client], 0.50, 450, 0);//Right Bar
- Huds::moveOverTime(Scroller[client], 0.50, 200, 120);//Scroller
- Huds::moveOverTime(Title[client], 0.50, 325, 200);//Title
- Huds::moveOverTime(MenuTitle[client], 0.50, 325, 100);
- Huds::moveOverTime(Options[client], 0.50, 320, 290);//Options
- Huds::moveOverTime(CreatedBy[client], 0.50, 320, 980);//Created By
- Variables::CurMenu[client] = SubName;
- Variables::CurMenu[client] = "Main Menu";
- Variables::MenuType[client] ++;
- Variables::MenuOpen[client] = true;
- }
- void DeleteHuds(int client)
- {
- Huds::moveOverTime(Background[client], 0.50, -500, 0);//Background
- Huds::moveOverTime(Scroller[client], 0.50, -500, 80);//Scroller
- Huds::moveOverTime(Title[client], 0.50, -500, 40);//Title
- Huds::moveOverTime(MenuTitle[client], 0.50, -500, 40);//Title
- Huds::moveOverTime(Options[client], 0.50, -500, 80);//Options
- Huds::moveOverTime(CreatedBy[client], 0.50, -500, 80);//Options
- Huds::moveOverTime(RightBar[client], 0.50, -500, 999);//Right Bar
- Huds::moveOverTime(LeftBar[client], 0.50, -500, 999);//Left Bar
- }
- //Menu Base Huds End
- //Menu Functions "God Mode, No Clip, Ect"
- namespace MenuFunctions
- {
- bool GM[18];
- void GodMode(int client)
- {
- if(GM[client] == false)
- {
- *(char*)(0x014E5429 + 0x5808 * client) = 0xFF, 0xFF;
- TOC_Calls::SV_GameSendServerCommand(client, 1, "f \"God Mode ^7[^2On^7]\"");
- GM[client] = true;
- }
- else
- {
- *(char*)(0x014E5429 + 0x5808 * client) = 0x00, 0x00;
- TOC_Calls::SV_GameSendServerCommand(client, 1, "f \"God Mode ^7[^1Off^7]\"");
- GM[client] = false;
- }
- }
- bool NC[18];
- void NoClip(int client)
- {
- if(NC[client] == false)
- {
- *(char*)(0x014E5623 + 0x3700 * client) = 0x01;
- TOC_Calls::SV_GameSendServerCommand(client, 1, "f \"No Clip ^7[^2On^7]\"");
- NC[client] = true;
- }
- else
- {
- *(char*)(0x014E5623 + 0x3700 * client) = 0x00;
- TOC_Calls::SV_GameSendServerCommand(client, 1, "f \"No Clip ^7[^1Off^7]\"");
- NC[client] = false;
- }
- }
- };
- //Menu Functions End
- //Menu Base Sub Functions "Dont Need To Edit This Stuff"
- void LoadText(int client)
- {
- Huds::fadeOverTime(Title[client], 0.50, 0, 0, 0, 0);
- Huds::fadeOverTime(Options[client], 0.50, 0, 0, 0, 0);
- sleep(100);
- ChangeText(Title[client], TitleText[client]);
- ChangeText(Options[client], OptionText[client]);
- sleep(100);
- Huds::fadeOverTime(Title[client], 0.50, 255, 255, 255, 255);
- Huds::fadeOverTime(Options[client], 0.50, 255, 255, 255, 255);
- }
- void UpdateScroll(int client)
- {
- float scrollpos = 120 + (19.2 * Scroll[client]);
- Huds::moveOverTime(Scroller[client], 0.30, 200, scrollpos);
- sleep(50);
- }
- void UpdateScrollLoad(int client)
- {
- float scrollpos = 120 + (19.2 * Scroll[client]);
- Huds::moveOverTime(Scroller[client], 0.30, 200, scrollpos);
- sleep(50);
- }
- void LoadSub(int client, char* NewMenu, int scroll)
- {
- if(Variables::MenuType[client] == 1)
- {
- MainScroll[client] = scroll;
- Scroll[client] = 0;
- UpdateScrollLoad(client);
- Variables::CurMenu[client] = NewMenu;
- Variables::MenuType[client] ++;
- Variables::MaxScroll[client] = GetMenuInfo(client, NewMenu);
- LoadText(client);
- }
- else if(Variables::MenuType[client] == 2)
- {
- SubScroll[client] = scroll;
- Scroll[client] = 0;
- UpdateScrollLoad(client);
- Variables::PreviousMenu[client] = Variables::CurMenu[client];
- Variables::CurMenu[client] = NewMenu;
- Variables::MenuType[client] ++;
- Variables::MaxScroll[client] = GetMenuInfo(client, NewMenu);
- LoadText(client);
- }
- else if(Variables::MenuType[client] > 2)
- {
- Scroll[client] = 0;
- UpdateScrollLoad(client);
- Variables::PreviousMenu2[client] = Variables::CurMenu[client];
- Variables::CurMenu[client] = NewMenu;
- Variables::MenuType[client] ++;
- Variables::MaxScroll[client] = GetMenuInfo(client, NewMenu);
- LoadText(client);
- }
- }
- //Menu Base Sub Functions End
- //Menu Selection "Where Functions Go"
- void MenuSelection(int client, char* Menu, int scroll)
- {
- if(Menu == "Main Menu")
- {
- if(scroll == 0)
- {
- LoadSub(client, "Sub Menu 1", scroll);
- }
- if(scroll == 1)
- {
- LoadSub(client, "Sub Menu 2", scroll);
- }
- if(scroll == 2)
- {
- LoadSub(client, "Sub Menu 3", scroll);
- }
- if(scroll == 3)
- {
- LoadSub(client, "Sub Menu 4", scroll);
- }
- if(scroll == 4)
- {
- LoadSub(client, "Sub Menu 5", scroll);
- }
- if(scroll == 5)
- {
- LoadSub(client, "Sub Menu 6", scroll);
- }
- if(scroll == 6)
- {
- LoadSub(client, "Sub Menu 7", scroll);
- }
- if(scroll == 7)
- {
- LoadSub(client, "Sub Menu 8", scroll);
- }
- if(scroll == 8)
- {
- LoadSub(client, "Sub Menu 9", scroll);
- }
- if(scroll == 9)
- {
- LoadSub(client, "Sub Menu 10", scroll);
- }
- if(scroll == 10)
- {
- LoadSub(client, "Sub Menu 11", scroll);
- }
- if(scroll == 11)
- {
- LoadSub(client, "Sub Menu 12", scroll);
- }
- if(scroll == 12)
- {
- LoadSub(client, "Sub Menu 13", scroll);
- }
- if(scroll == 13)
- {
- LoadSub(client, "Sub Menu 14", scroll);
- }
- if(scroll == 14)
- {
- LoadSub(client, "Sub Menu 15", scroll);
- }
- }
- if(Menu == "Sub Menu 1")
- {
- if(scroll == 0)
- {
- MenuFunctions::GodMode(client);
- }
- if(scroll == 1)
- {
- MenuFunctions::NoClip(client);
- }
- }
- if(Menu == "Sub Menu 2")
- {
- if(scroll == 0)
- {
- //Sub Menu 2 Option 1 Here
- }
- if(scroll == 1)
- {
- //Sub Menu 2 Option 2 Here
- }
- if(scroll == 2)
- {
- //Sub Menu 2 Option 3 Here
- }
- if(scroll == 3)
- {
- //Sub Menu 2 Option 4 Here
- }
- if(scroll == 4)
- {
- //Sub Menu 2 Option 5 Here
- }
- if(scroll == 5)
- {
- //Sub Menu 2 Option 6 Here
- }
- if(scroll == 6)
- {
- //Sub Menu 2 Option 7 Here
- }
- if(scroll == 7)
- {
- //Sub Menu 2 Option 8 Here
- }
- if(scroll == 8)
- {
- //Sub Menu 2 Option 9 Here
- }
- if(scroll == 9)
- {
- //Sub Menu 2 Option 10 Here
- }
- if(scroll == 10)
- {
- //Sub Menu 2 Option 11 Here
- }
- if(scroll == 11)
- {
- //Sub Menu 2 Option 12 Here
- }
- if(scroll == 12)
- {
- //Sub Menu 2 Option 13 Here
- }
- if(scroll == 13)
- {
- //Sub Menu 2 Option 14 Here
- }
- if(scroll == 14)
- {
- //Sub Menu 2 Option 15 Here
- }
- }
- if(Menu == "Sub Menu 3")
- {
- if(scroll == 0)
- {
- //Sub Menu 3 Option 1 Here
- }
- if(scroll == 1)
- {
- //Sub Menu 3 Option 2 Here
- }
- if(scroll == 2)
- {
- //Sub Menu 3 Option 3 Here
- }
- if(scroll == 3)
- {
- //Sub Menu 3 Option 4 Here
- }
- if(scroll == 4)
- {
- //Sub Menu 3 Option 5 Here
- }
- if(scroll == 5)
- {
- //Sub Menu 3 Option 6 Here
- }
- if(scroll == 6)
- {
- //Sub Menu 3 Option 7 Here
- }
- if(scroll == 7)
- {
- //Sub Menu 3 Option 8 Here
- }
- if(scroll == 8)
- {
- //Sub Menu 3 Option 9 Here
- }
- if(scroll == 9)
- {
- //Sub Menu 3 Option 10 Here
- }
- if(scroll == 10)
- {
- //Sub Menu 3 Option 11 Here
- }
- if(scroll == 11)
- {
- //Sub Menu 3 Option 12 Here
- }
- if(scroll == 12)
- {
- //Sub Menu 3 Option 13 Here
- }
- if(scroll == 13)
- {
- //Sub Menu 3 Option 14 Here
- }
- if(scroll == 14)
- {
- //Sub Menu 3 Option 15 Here
- }
- }
- if(Menu == "Sub Menu 4")
- {
- if(scroll == 0)
- {
- //Sub Menu 4 Option 1 Here
- }
- if(scroll == 1)
- {
- //Sub Menu 4 Option 2 Here
- }
- if(scroll == 2)
- {
- //Sub Menu 4 Option 3 Here
- }
- if(scroll == 3)
- {
- //Sub Menu 4 Option 4 Here
- }
- if(scroll == 4)
- {
- //Sub Menu 4 Option 5 Here
- }
- if(scroll == 5)
- {
- //Sub Menu 4 Option 6 Here
- }
- if(scroll == 6)
- {
- //Sub Menu 4 Option 7 Here
- }
- if(scroll == 7)
- {
- //Sub Menu 4 Option 8 Here
- }
- if(scroll == 8)
- {
- //Sub Menu 4 Option 9 Here
- }
- if(scroll == 9)
- {
- //Sub Menu 4 Option 10 Here
- }
- if(scroll == 10)
- {
- //Sub Menu 4 Option 11 Here
- }
- if(scroll == 11)
- {
- //Sub Menu 4 Option 12 Here
- }
- if(scroll == 12)
- {
- //Sub Menu 4 Option 13 Here
- }
- if(scroll == 13)
- {
- //Sub Menu 4 Option 14 Here
- }
- if(scroll == 14)
- {
- //Sub Menu 4 Option 15 Here
- }
- }
- if(Menu == "Sub Menu 5")
- {
- if(scroll == 0)
- {
- //Sub Menu 5 Option 1 Here
- }
- if(scroll == 1)
- {
- //Sub Menu 5 Option 2 Here
- }
- if(scroll == 2)
- {
- //Sub Menu 5 Option 3 Here
- }
- if(scroll == 3)
- {
- //Sub Menu 5 Option 4 Here
- }
- if(scroll == 4)
- {
- //Sub Menu 5 Option 5 Here
- }
- if(scroll == 5)
- {
- //Sub Menu 5 Option 6 Here
- }
- if(scroll == 6)
- {
- //Sub Menu 5 Option 7 Here
- }
- if(scroll == 7)
- {
- //Sub Menu 5 Option 8 Here
- }
- if(scroll == 8)
- {
- //Sub Menu 5 Option 9 Here
- }
- if(scroll == 9)
- {
- //Sub Menu 5 Option 10 Here
- }
- if(scroll == 10)
- {
- //Sub Menu 5 Option 11 Here
- }
- if(scroll == 11)
- {
- //Sub Menu 5 Option 12 Here
- }
- if(scroll == 12)
- {
- //Sub Menu 5 Option 13 Here
- }
- if(scroll == 13)
- {
- //Sub Menu 5 Option 14 Here
- }
- if(scroll == 14)
- {
- //Sub Menu 5 Option 15 Here
- }
- }
- if(Menu == "Sub Menu 6")
- {
- if(scroll == 0)
- {
- //Sub Menu 6 Option 1 Here
- }
- if(scroll == 1)
- {
- //Sub Menu 6 Option 2 Here
- }
- if(scroll == 2)
- {
- //Sub Menu 6 Option 3 Here
- }
- if(scroll == 3)
- {
- //Sub Menu 6 Option 4 Here
- }
- if(scroll == 4)
- {
- //Sub Menu 6 Option 5 Here
- }
- if(scroll == 5)
- {
- //Sub Menu 6 Option 6 Here
- }
- if(scroll == 6)
- {
- //Sub Menu 6 Option 7 Here
- }
- if(scroll == 7)
- {
- //Sub Menu 6 Option 8 Here
- }
- if(scroll == 8)
- {
- //Sub Menu 6 Option 9 Here
- }
- if(scroll == 9)
- {
- //Sub Menu 6 Option 10 Here
- }
- if(scroll == 10)
- {
- //Sub Menu 6 Option 11 Here
- }
- if(scroll == 11)
- {
- //Sub Menu 6 Option 12 Here
- }
- if(scroll == 12)
- {
- //Sub Menu 6 Option 13 Here
- }
- if(scroll == 13)
- {
- //Sub Menu 6 Option 14 Here
- }
- if(scroll == 14)
- {
- //Sub Menu 6 Option 15 Here
- }
- }
- if(Menu == "Sub Menu 7")
- {
- if(scroll == 0)
- {
- //Sub Menu 7 Option 1 Here
- }
- if(scroll == 1)
- {
- //Sub Menu 7 Option 2 Here
- }
- if(scroll == 2)
- {
- //Sub Menu 7 Option 3 Here
- }
- if(scroll == 3)
- {
- //Sub Menu 7 Option 4 Here
- }
- if(scroll == 4)
- {
- //Sub Menu 7 Option 5 Here
- }
- if(scroll == 5)
- {
- //Sub Menu 7 Option 6 Here
- }
- if(scroll == 6)
- {
- //Sub Menu 7 Option 7 Here
- }
- if(scroll == 7)
- {
- //Sub Menu 7 Option 8 Here
- }
- if(scroll == 8)
- {
- //Sub Menu 7 Option 9 Here
- }
- if(scroll == 9)
- {
- //Sub Menu 7 Option 10 Here
- }
- if(scroll == 10)
- {
- //Sub Menu 7 Option 11 Here
- }
- if(scroll == 11)
- {
- //Sub Menu 7 Option 12 Here
- }
- if(scroll == 12)
- {
- //Sub Menu 7 Option 13 Here
- }
- if(scroll == 13)
- {
- //Sub Menu 7 Option 14 Here
- }
- if(scroll == 14)
- {
- //Sub Menu 7 Option 15 Here
- }
- }
- if(Menu == "Sub Menu 8")
- {
- if(scroll == 0)
- {
- //Sub Menu 8 Option 1 Here
- }
- if(scroll == 1)
- {
- //Sub Menu 8 Option 2 Here
- }
- if(scroll == 2)
- {
- //Sub Menu 8 Option 3 Here
- }
- if(scroll == 3)
- {
- //Sub Menu 8 Option 4 Here
- }
- if(scroll == 4)
- {
- //Sub Menu 8 Option 5 Here
- }
- if(scroll == 5)
- {
- //Sub Menu 8 Option 6 Here
- }
- if(scroll == 6)
- {
- //Sub Menu 8 Option 7 Here
- }
- if(scroll == 7)
- {
- //Sub Menu 8 Option 8 Here
- }
- if(scroll == 8)
- {
- //Sub Menu 8 Option 9 Here
- }
- if(scroll == 9)
- {
- //Sub Menu 8 Option 10 Here
- }
- if(scroll == 10)
- {
- //Sub Menu 8 Option 11 Here
- }
- if(scroll == 11)
- {
- //Sub Menu 8 Option 12 Here
- }
- if(scroll == 12)
- {
- //Sub Menu 8 Option 13 Here
- }
- if(scroll == 13)
- {
- //Sub Menu 8 Option 14 Here
- }
- if(scroll == 14)
- {
- //Sub Menu 8 Option 15 Here
- }
- }
- if(Menu == "Sub Menu 9")
- {
- if(scroll == 0)
- {
- //Sub Menu 9 Option 1 Here
- }
- if(scroll == 1)
- {
- //Sub Menu 9 Option 2 Here
- }
- if(scroll == 2)
- {
- //Sub Menu 9 Option 3 Here
- }
- if(scroll == 3)
- {
- //Sub Menu 9 Option 4 Here
- }
- if(scroll == 4)
- {
- //Sub Menu 9 Option 5 Here
- }
- if(scroll == 5)
- {
- //Sub Menu 9 Option 6 Here
- }
- if(scroll == 6)
- {
- //Sub Menu 9 Option 7 Here
- }
- if(scroll == 7)
- {
- //Sub Menu 9 Option 8 Here
- }
- if(scroll == 8)
- {
- //Sub Menu 9 Option 9 Here
- }
- if(scroll == 9)
- {
- //Sub Menu 9 Option 10 Here
- }
- if(scroll == 10)
- {
- //Sub Menu 9 Option 11 Here
- }
- if(scroll == 11)
- {
- //Sub Menu 9 Option 12 Here
- }
- if(scroll == 12)
- {
- //Sub Menu 9 Option 13 Here
- }
- if(scroll == 13)
- {
- //Sub Menu 9 Option 14 Here
- }
- if(scroll == 14)
- {
- //Sub Menu 9 Option 15 Here
- }
- }
- if(Menu == "Sub Menu 10")
- {
- if(scroll == 0)
- {
- //Sub Menu 10 Option 1 Here
- }
- if(scroll == 1)
- {
- //Sub Menu 10 Option 2 Here
- }
- if(scroll == 2)
- {
- //Sub Menu 10 Option 3 Here
- }
- if(scroll == 3)
- {
- //Sub Menu 10 Option 4 Here
- }
- if(scroll == 4)
- {
- //Sub Menu 10 Option 5 Here
- }
- if(scroll == 5)
- {
- //Sub Menu 10 Option 6 Here
- }
- if(scroll == 6)
- {
- //Sub Menu 10 Option 7 Here
- }
- if(scroll == 7)
- {
- //Sub Menu 10 Option 8 Here
- }
- if(scroll == 8)
- {
- //Sub Menu 10 Option 9 Here
- }
- if(scroll == 9)
- {
- //Sub Menu 10 Option 10 Here
- }
- if(scroll == 10)
- {
- //Sub Menu 10 Option 11 Here
- }
- if(scroll == 11)
- {
- //Sub Menu 10 Option 12 Here
- }
- if(scroll == 12)
- {
- //Sub Menu 10 Option 13 Here
- }
- if(scroll == 13)
- {
- //Sub Menu 10 Option 14 Here
- }
- if(scroll == 14)
- {
- //Sub Menu 10 Option 15 Here
- }
- }
- if(Menu == "Sub Menu 11")
- {
- if(scroll == 0)
- {
- //Sub Menu 11 Option 1 Here
- }
- if(scroll == 1)
- {
- //Sub Menu 11 Option 2 Here
- }
- if(scroll == 2)
- {
- //Sub Menu 11 Option 3 Here
- }
- if(scroll == 3)
- {
- //Sub Menu 11 Option 4 Here
- }
- if(scroll == 4)
- {
- //Sub Menu 11 Option 5 Here
- }
- if(scroll == 5)
- {
- //Sub Menu 11 Option 6 Here
- }
- if(scroll == 6)
- {
- //Sub Menu 11 Option 7 Here
- }
- if(scroll == 7)
- {
- //Sub Menu 11 Option 8 Here
- }
- if(scroll == 8)
- {
- //Sub Menu 11 Option 9 Here
- }
- if(scroll == 9)
- {
- //Sub Menu 11 Option 10 Here
- }
- if(scroll == 10)
- {
- //Sub Menu 11 Option 11 Here
- }
- if(scroll == 11)
- {
- //Sub Menu 11 Option 12 Here
- }
- if(scroll == 12)
- {
- //Sub Menu 11 Option 13 Here
- }
- if(scroll == 13)
- {
- //Sub Menu 11 Option 14 Here
- }
- if(scroll == 14)
- {
- //Sub Menu 11 Option 15 Here
- }
- }
- if(Menu == "Sub Menu 12")
- {
- if(scroll == 0)
- {
- //Sub Menu 12 Option 1 Here
- }
- if(scroll == 1)
- {
- //Sub Menu 12 Option 2 Here
- }
- if(scroll == 2)
- {
- //Sub Menu 12 Option 3 Here
- }
- if(scroll == 3)
- {
- //Sub Menu 12 Option 4 Here
- }
- if(scroll == 4)
- {
- //Sub Menu 12 Option 5 Here
- }
- if(scroll == 5)
- {
- //Sub Menu 12 Option 6 Here
- }
- if(scroll == 6)
- {
- //Sub Menu 12 Option 7 Here
- }
- if(scroll == 7)
- {
- //Sub Menu 12 Option 8 Here
- }
- if(scroll == 8)
- {
- //Sub Menu 12 Option 9 Here
- }
- if(scroll == 9)
- {
- //Sub Menu 12 Option 10 Here
- }
- if(scroll == 10)
- {
- //Sub Menu 12 Option 11 Here
- }
- if(scroll == 11)
- {
- //Sub Menu 12 Option 12 Here
- }
- if(scroll == 12)
- {
- //Sub Menu 12 Option 13 Here
- }
- if(scroll == 13)
- {
- //Sub Menu 12 Option 14 Here
- }
- if(scroll == 14)
- {
- //Sub Menu 12 Option 15 Here
- }
- }
- if(Menu == "Sub Menu 13")
- {
- if(scroll == 0)
- {
- //Sub Menu 13 Option 1 Here
- }
- if(scroll == 1)
- {
- //Sub Menu 13 Option 2 Here
- }
- if(scroll == 2)
- {
- //Sub Menu 13 Option 3 Here
- }
- if(scroll == 3)
- {
- //Sub Menu 13 Option 4 Here
- }
- if(scroll == 4)
- {
- //Sub Menu 13 Option 5 Here
- }
- if(scroll == 5)
- {
- //Sub Menu 13 Option 6 Here
- }
- if(scroll == 6)
- {
- //Sub Menu 13 Option 7 Here
- }
- if(scroll == 7)
- {
- //Sub Menu 13 Option 8 Here
- }
- if(scroll == 8)
- {
- //Sub Menu 13 Option 9 Here
- }
- if(scroll == 9)
- {
- //Sub Menu 13 Option 10 Here
- }
- if(scroll == 10)
- {
- //Sub Menu 13 Option 11 Here
- }
- if(scroll == 11)
- {
- //Sub Menu 13 Option 12 Here
- }
- if(scroll == 12)
- {
- //Sub Menu 13 Option 13 Here
- }
- if(scroll == 13)
- {
- //Sub Menu 13 Option 14 Here
- }
- if(scroll == 14)
- {
- //Sub Menu 13 Option 15 Here
- }
- }
- if(Menu == "Sub Menu 14")
- {
- if(scroll == 0)
- {
- //Sub Menu 14 Option 1 Here
- }
- if(scroll == 1)
- {
- //Sub Menu 14 Option 2 Here
- }
- if(scroll == 2)
- {
- //Sub Menu 14 Option 3 Here
- }
- if(scroll == 3)
- {
- //Sub Menu 14 Option 4 Here
- }
- if(scroll == 4)
- {
- //Sub Menu 14 Option 5 Here
- }
- if(scroll == 5)
- {
- //Sub Menu 14 Option 6 Here
- }
- if(scroll == 6)
- {
- //Sub Menu 14 Option 7 Here
- }
- if(scroll == 7)
- {
- //Sub Menu 14 Option 8 Here
- }
- if(scroll == 8)
- {
- //Sub Menu 14 Option 9 Here
- }
- if(scroll == 9)
- {
- //Sub Menu 14 Option 10 Here
- }
- if(scroll == 10)
- {
- //Sub Menu 14 Option 11 Here
- }
- if(scroll == 11)
- {
- //Sub Menu 14 Option 12 Here
- }
- if(scroll == 12)
- {
- //Sub Menu 14 Option 13 Here
- }
- if(scroll == 13)
- {
- //Sub Menu 14 Option 14 Here
- }
- if(scroll == 14)
- {
- //Sub Menu 14 Option 15 Here
- }
- }
- if(Menu == "Sub Menu 15")
- {
- if(scroll == 0)
- {
- //Sub Menu 15 Option 1 Here
- }
- if(scroll == 1)
- {
- //Sub Menu 15 Option 2 Here
- }
- if(scroll == 2)
- {
- //Sub Menu 15 Option 3 Here
- }
- if(scroll == 3)
- {
- //Sub Menu 15 Option 4 Here
- }
- if(scroll == 4)
- {
- //Sub Menu 15 Option 5 Here
- }
- if(scroll == 5)
- {
- //Sub Menu 15 Option 6 Here
- }
- if(scroll == 6)
- {
- //Sub Menu 15 Option 7 Here
- }
- if(scroll == 7)
- {
- //Sub Menu 15 Option 8 Here
- }
- if(scroll == 8)
- {
- //Sub Menu 15 Option 9 Here
- }
- if(scroll == 9)
- {
- //Sub Menu 15 Option 10 Here
- }
- if(scroll == 10)
- {
- //Sub Menu 15 Option 11 Here
- }
- if(scroll == 11)
- {
- //Sub Menu 15 Option 12 Here
- }
- if(scroll == 12)
- {
- //Sub Menu 15 Option 13 Here
- }
- if(scroll == 13)
- {
- //Sub Menu 15 Option 14 Here
- }
- if(scroll == 14)
- {
- //Sub Menu 15 Option 15 Here
- }
- }
- }
- //Menu Selection End
- //Random Stuff "Dont Edit"
- void Return(int client)
- {
- if(Variables::MenuType[client] == 2)
- {
- Scroll[client] = MainScroll[client];
- UpdateScroll(client);
- Variables::CurMenu[client] = SubName;
- Variables::MenuType[client] --;
- Variables::MaxScroll[client] = GetMenuInfo(client, SubName);
- LoadText(client);
- }
- else if(Variables::MenuType[client] == 3)
- {
- Scroll[client] = SubScroll[client];
- UpdateScroll(client);
- Variables::CurMenu[client] = Variables::PreviousMenu[client];
- Variables::MenuType[client] --;
- Variables::MaxScroll[client] = GetMenuInfo(client, Variables::PreviousMenu[client]);
- LoadText(client);
- }
- else if(Variables::MenuType[client] > 3)
- {
- Scroll[client] = 0;
- UpdateScroll(client);
- Variables::CurMenu[client] = Variables::PreviousMenu2[client];
- Variables::MenuType[client] --;
- Variables::MaxScroll[client] = GetMenuInfo(client, Variables::PreviousMenu2[client]);
- LoadText(client);
- }
- }
- bool MenuLoaded;
- bool menuOpen[18];
- bool MainMenu[18];
- //Random Stuff End
- //Menu Threads
- void ButtonMonitoring(std::uint64_t)
- {
- for(;;)
- {
- if(TOC_Calls::Dvar_GetBool("cl_ingame") == 1)
- {
- if (!MenuLoaded)
- {
- sleep(1000);
- HostClientNumber = getHostClientNumber();
- Variables::MaxScroll[HostClientNumber] = 14;
- StoreHuds(HostClientNumber);
- MenuLoaded = true;
- }
- else
- {
- if(MenuLoaded)
- {
- if (ButtonPressed(HostClientNumber, "+actionslot 1") && !menuOpen[HostClientNumber])
- {
- TOC_Calls::SV_GameSendServerCommand(HostClientNumber, 1, "v loc_warnings \"0\"");//Rid Of Localized String
- TOC_Calls::SV_GameSendServerCommand(HostClientNumber, 1, "v loc_warningsAsErrors \"0\"");//Rid Of Localized String
- Variables::Scroll[HostClientNumber] = 0;
- UpdateScroll(HostClientNumber);
- menuOpen[HostClientNumber] = true;
- TOC_Calls::SV_GameSendServerCommand(HostClientNumber, 1, "f \"Menu Base ^7[^2Opened^7]\"");
- LoadHuds(HostClientNumber);
- TOC_Calls::SV_GameSendServerCommand(HostClientNumber, 1, "o \"mp_bonus_start\"");
- }
- else if (MainMenu && ButtonPressed(HostClientNumber, "+usereload") && menuOpen[HostClientNumber])
- {
- if(Variables::CurMenu[HostClientNumber] != SubName)
- {
- Return(HostClientNumber);
- }
- else
- {
- menuOpen[HostClientNumber] = false;
- Variables::MenuType[HostClientNumber] --;
- TOC_Calls::SV_GameSendServerCommand(HostClientNumber, 1, "f \"Menu Base ^7[^1Closed^7]\"");
- TOC_Calls::SV_GameSendServerCommand(HostClientNumber, 1, "o \"mp_suitcase_pickup\"");
- DeleteHuds(HostClientNumber);
- }
- sleep(200);
- }
- else if (MainMenu && ButtonPressed(HostClientNumber, "+actionslot 1") && menuOpen[HostClientNumber])
- {
- Scroll[HostClientNumber] --;
- if(Scroll[HostClientNumber] < 0)
- {
- Scroll[HostClientNumber] = MaxScroll[HostClientNumber];
- }
- UpdateScroll(HostClientNumber);
- }
- else if (MainMenu && ButtonPressed(HostClientNumber, "+actionslot 2") && menuOpen[HostClientNumber])
- {
- Scroll[HostClientNumber] ++;
- if(Scroll[HostClientNumber] > MaxScroll[HostClientNumber])
- {
- Scroll[HostClientNumber] = 0;
- }
- UpdateScroll(HostClientNumber);
- }
- else if (ButtonPressed(HostClientNumber, "+gostand") && menuOpen[HostClientNumber])
- {
- MenuSelection(HostClientNumber, Variables::CurMenu[HostClientNumber], Scroll[HostClientNumber]);
- TOC_Calls::SV_GameSendServerCommand(HostClientNumber, 1, "o \"mp_ingame_summary\"");
- }
- else if(ButtonPressed(HostClientNumber, "+actionslot 4") && menuOpen[HostClientNumber])//Dpad Right
- {
- }
- else if(ButtonPressed(HostClientNumber, "+actionslot 3") && menuOpen[HostClientNumber])//Dpad Left
- {
- }
- }
- }
- sleep(150);
- }
- else
- {
- MenuLoaded = false;//shhhhh
- HostClientNumber = -1;
- }
- }
- }
- void NewsBar(std::uint64_t)
- {
- //Add NewsBar Here if Wanted
- }
- // An exported function is needed to generate the project's PRX stub export library
- extern "C" int _Mw2SPRX_export_function(void)
- {
- return CELL_OK;
- }
- extern "C" int _Mw2SPRX_prx_entry(void)
- {
- create_thread(ButtonMonitoring, 0x4AA, 0x7000, "Mw2 Menu", mw2menu);
- create_thread(NewsBar, 0x4BB, 0x7000, "Mw2 Menu", NewsBarThread);
- return SYS_PRX_RESIDENT;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement