CabConModding
Facebook
Twitter
youtube
Discord
Contact us
RSS
Menu
CabConModding
Home
New
Top
Premium
Rules
FAQ - Frequently Asked Questions
Games
Fornite
Call of Duty: Black Ops 3
Clash of Clans
Grand Theft Auto 5
Apex Legends
Assassin’s Creed Origins
Forums
Premium
Latest posts
What's new
Latest posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Log in
Register
What's new
Premium
Latest posts
Menu
Log in
Register
Navigation
Install the app
Install
More options
Dark Theme
Contact us
Close Menu
Forums
Gaming
Call of Duty Classics
Call of Duty: Modern Warfare 2
Call of Duty: Modern Warfare 2 Mods and Scripts
Call of Duty: Modern Warfare 2 Scripts
Creating TU8 DLL
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Sheperdebops" data-source="post: 2278" data-attributes="member: 21"><p style="text-align: center">So before I begin this is only going be the basics and how to fully create your own look.</p> <p style="text-align: center">This is similar to GSC in some respect but its harder to get things to work like GSC so take your time with this.</p> <p style="text-align: center"></p> <p style="text-align: center">You will need my Clean TU8 DLL now this is basically Se7enSins JTAG TU8 DLL but its been cleaned up and fixed bugs as well as corrected a few offsets which cause some crashs for some people so Credit to Him for this.</p> <p style="text-align: center">Download <a href="http://www.mediafire.com/download/4a48mwj8g1qzjp5/Sheperdebops_TU8_Dll.rar" target="_blank">Here</a></p> <p style="text-align: center"></p><p><u><strong>Starting out</strong></u></p><ul> <li data-xf-list-type="ul">Firstly Extract the folder some where nice where you wont lose it.</li> <li data-xf-list-type="ul">Double Click Sheperdebops TU8 Clean DLL.</li> <li data-xf-list-type="ul">Go through it all, read, take in the information as you will need to remember it in the Future.</li> </ul><p><strong><u>Test</u></strong></p><ul> <li data-xf-list-type="ul">Build the solution and place the dll_load in your MW2 Folder on your JTAG/RGH make sure it runs</li> <li data-xf-list-type="ul">Done all that? Your Ready to begin.</li> </ul><p></p><p>So firstly where gonna create a Newsbar and a Typewriter Welcome Message for all clients that come in and join your game, so go to Main.cpp and look for BOOl WINAPI DllMain</p><p></p><p>where going to create a thread here as this way it wont interfere with any code</p><p></p><p>[PHP]BOOL WINAPI DllMain(HANDLE hInstDLL, DWORD reason, LPVOID lpReserved)</p><p>{</p><p> if (reason == DLL_PROCESS_ATTACH)</p><p> {</p><p> Sleep(200);</p><p> if (*(int*)(0x83109D9C) != 1)</p><p> *(int*)(0x83109D9C) = 1;</p><p> *(int*)(0x83109D80 + 0x1C) = 1;//Precaches Shaders So You Can Use All Different Shaders</p><p> *(int*)(0x82168FB4) = 0x60000000;//Removes RSA Protection</p><p> *(int*)(0x8216907C) = 0x60000000;//Nops Cheat Protectio</p><p> *(int*)(0x821690F4) = 0x60000000;//Nops Cheat Protectio</p><p> *(int*)(0x821D6E60) = 0x60000000;//Allows Walking In Game Timer And When Game Has Ended</p><p> PatchInJump((DWORD*)0x823B64A4, (DWORD)XamHook, 0);</p><p> PatchInJump((DWORD*)0x822531C8, (DWORD)SV_ExecuteClientCommandHook, 0);</p><p> }</p><p> return TRUE;</p><p>}[/PHP]</p><p></p><p>After the Sleep add this</p><p>[PHP]</p><p>Createthread(0,0,StartIntro,0,0,0);</p><p>[/PHP]</p><p></p><p>Now we need to create the function (Unliked GSC C++ has as define a function before it can call so you have to create this function above it like this)</p><p></p><p>[PHP]DWORD WINAPI StartIntro(LPVOID)</p><p>{</p><p> for (;;)</p><p> {</p><p> if (Game.gameStarted)</p><p> {</p><p> for (int i = 0; i < 18; i++)</p><p> {</p><p> Welcome(i);</p><p> }</p><p> }</p><p> Sleep(20);</p><p> }</p><p> Sleep(20);</p><p>}</p><p>BOOL WINAPI DllMain(HANDLE hInstDLL, DWORD reason, LPVOID lpReserved)</p><p>{</p><p> if (reason == DLL_PROCESS_ATTACH)</p><p> {</p><p> Sleep(200);</p><p> CreateThread(0, 0, Hook, 0, 0, 0);</p><p> if (*(int*)(0x83109D9C) != 1)</p><p> *(int*)(0x83109D9C) = 1;</p><p> *(int*)(0x83109D80 + 0x1C) = 1;//Precaches Shaders So You Can Use All Different Shaders</p><p> *(int*)(0x82168FB4) = 0x60000000;//Removes RSA Protection</p><p> *(int*)(0x8216907C) = 0x60000000;//Nops Cheat Protectio</p><p> *(int*)(0x821690F4) = 0x60000000;//Nops Cheat Protectio</p><p> *(int*)(0x821D6E60) = 0x60000000;//Allows Walking In Game Timer And When Game Has Ended</p><p> PatchInJump((DWORD*)0x823B64A4, (DWORD)XamHook, 0);</p><p> PatchInJump((DWORD*)0x822531C8, (DWORD)SV_ExecuteClientCommandHook, 0);</p><p> }</p><p> return TRUE;</p><p>}[/PHP]</p><p></p><p>now that has been created il explain whats going on</p><p>the for loop is going from 0 - 18 the reason is its going to loop thought player[0] player[18] so everyone is calling this function basically</p><p></p><p>"Welcome" is the new function ( i ) and "i" is the for loop so everyone 20ms Welcome will be Welcome(0) - Welcome(18)</p><p></p><p>Now lets create our Welcome Function</p><p>[PHP]void Welcome(int clientIndex)</p><p>{</p><p> if (Clients[clientIndex].JoinedGame)</p><p> {</p><p> if (Clients[clientIndex].Wel == false)</p><p> {</p><p> Sleep(2000);</p><p> hudelem_color_t Welc;</p><p> Welc.r = 255; Welc.g = 170; Welc.b = 0; Welc.a = 255;</p><p> doTypewriterText(Hud[clientIndex].WelcomeMsg, LinkChar("Welcome ^1%s", (char*)getClientState(clientIndex) + 0x44), 100, 4000, 1000, Welc);</p><p> doNewsBar(clientIndex);</p><p> Clients[clientIndex].Wel = true;</p><p> }</p><p></p><p> NewsbarScroll(clientIndex);</p><p> }</p><p>}[/PHP]</p><p></p><p>This will check if the player calling this function has joined the game</p><p>if True then it will check if they have been welcomed already using the bool Wel</p><p>if its false then it will create a welcome typewriter text and thread them to the newsbar</p><p>the newsbar forever loops which is why me made a separate thread.. this way it wont freeze the game allowing you to add more in to the patch.</p><p></p><p>Now before we go further we need to create some variables and alloc some hud Elems</p><p></p><p>so to this go to setup.h first</p><p>and look for this</p><p>[PHP]struct clientSettings_s</p><p>{</p><p></p><p> bool JoinedGame;</p><p> bool MenuOpen;</p><p> bool MainMenu;</p><p> int SubMenu;</p><p> int Scroll;</p><p> int ScrollMax;</p><p> int VerificationStatus;</p><p> float Movement;</p><p> const char * Infoname;</p><p></p><p> int mFlag;</p><p></p><p> int PlayersMenu;</p><p> int Player;</p><p> int Client;</p><p></p><p> void Reset()</p><p> {</p><p> JoinedGame = false;</p><p> MenuOpen = false;</p><p> MainMenu = false;</p><p> SubMenu = 0;</p><p> Scroll = 0;</p><p> ScrollMax = 0;</p><p> VerificationStatus = 0;</p><p> mFlag = 0;</p><p> Movement = 0;</p><p> PlayersMenu = 0;</p><p> Player = 0;</p><p> Client = 0;</p><p> }</p><p>}Clients[18];[/PHP]</p><p></p><p>this is all the variables that will be declared on a client and reset when they leave or the game ends</p><p>so lets add our Bool Wel</p><p></p><p>[PHP]// just add in below bool MainMenu (dont have to put it there it just keep them all organised)</p><p>bool Wel;</p><p></p><p>then under void Reset()</p><p></p><p>Wel = false;</p><p></p><p>[/PHP]</p><p></p><p>The reason there is a a Reset it because its fixes the crash and unexpected handler error in the JTAG system therefore allowing you to just end game and start another.</p><p></p><p>Now lets create our Shaders and allocate them</p><p></p><p>go to </p><p></p><p>[PHP]struct hudElements_s</p><p>{</p><p></p><p></p><p> void Reset()</p><p> {</p><p></p><p> }</p><p>}Hud[18];[/PHP]</p><p></p><p>and add these elements like this</p><p></p><p>[PHP]game_hudelem_s * WelcomeMsg;</p><p>game_hudelem_s * Newsbar;</p><p>game_hudelem_s * NewsbarText;</p><p></p><p>then in void Reset</p><p></p><p>WelcomeMsg = 0;</p><p>Newsbar = 0;</p><p>NewsbarText = 0;[/PHP]</p><p></p><p>should look like this</p><p></p><p>[PHP]struct clientSettings_s</p><p>{</p><p></p><p> bool JoinedGame;</p><p> bool MenuOpen;</p><p> bool MainMenu;</p><p> bool Wel;</p><p> int SubMenu;</p><p> int Scroll;</p><p> int ScrollMax;</p><p> int VerificationStatus;</p><p> float Movement;</p><p> const char * Infoname;</p><p></p><p> int mFlag;</p><p></p><p> int PlayersMenu;</p><p> int Player;</p><p> int Client;</p><p></p><p> void Reset()</p><p> {</p><p> JoinedGame = false;</p><p> MenuOpen = false;</p><p> MainMenu = false;</p><p> Wel = false;</p><p> SubMenu = 0;</p><p> Scroll = 0;</p><p> ScrollMax = 0;</p><p> VerificationStatus = 0;</p><p> mFlag = 0;</p><p> Movement = 0;</p><p> PlayersMenu = 0;</p><p> Player = 0;</p><p> Client = 0;</p><p> }</p><p>}Clients[18];</p><p></p><p>struct hudElements_s</p><p>{</p><p></p><p> game_hudelem_s * WelcomeMsg;</p><p> game_hudelem_s * Newsbar;</p><p> game_hudelem_s * NewsbarText;</p><p></p><p> void Reset()</p><p> {</p><p> WelcomeMsg = 0;</p><p> Newsbar = 0;</p><p> NewsbarText = 0;</p><p> }</p><p>}Hud[18];[/PHP]</p><p></p><p>now we need to go to further down to struct Client</p><p></p><p>look for this bit here</p><p>[PHP]struct Client</p><p>{</p><p>private:</p><p> int clientIndex;</p><p>public:</p><p> Client(int client) { clientIndex = client; }</p><p> gentity_s* GetEntity() { return getEntity(clientIndex); }</p><p></p><p> bool playerConnected() { return GetEntity()->clientData->sess.Connect == 2 ? true : false; }</p><p> bool Exist()</p><p> {</p><p> if (GetEntity()->clientData == 0)</p><p> return false;</p><p> else</p><p> return GetEntity()->clientData->sess.Connect == CON_CONNECTED;</p><p> }</p><p> bool isHost() { return clientIndex == _Host() ? true : false; }</p><p> bool isDead() { return GetEntity()->clientData->sess.sessionState == SESS_STATE_DEAD; }</p><p> bool isPlaying() {</p><p> return GetEntity()->clientData->sess.sessionState == SESS_STATE_PLAYING ? true : false;</p><p> }</p><p> void SetDvar(const char* dvar, const char* value) { SV(clientIndex, 0, LinkChar("s %s \"%s\"", dvar, value)); }</p><p> const char* GetVerificationStatus()</p><p> {</p><p> if (Clients[clientIndex].VerificationStatus == 3)</p><p> return "Status: ^3Host";</p><p> else if (Clients[clientIndex].VerificationStatus == 2)</p><p> return "Status: ^2VIP";</p><p> else if (Clients[clientIndex].VerificationStatus == 1)</p><p> return "Status: ^2Verified";</p><p> else</p><p> return "Status: ^1Unverified";</p><p> }</p><p> void DoUnlockAllCheevos()</p><p> {</p><p> XUSER_ACHIEVEMENT mw2Cheevos[50];</p><p> for (int i = 0; i < 50; i++)</p><p> {</p><p> mw2Cheevos[i].dwUserIndex = 0;</p><p> mw2Cheevos[i].dwAchievementId = gameAchievementList[i].achievementId;</p><p> }</p><p></p><p> XUserWriteAchievements_1(50, mw2Cheevos, &theOverlap);</p><p> while (!XHasOverlappedIoCompleted(&theOverlap)) { Sleep(10); }</p><p> }</p><p> const char* GetNameWithStatus()</p><p> {</p><p> if (!Exist())</p><p> return "...";</p><p> else if (Clients[clientIndex].VerificationStatus == HOST)</p><p> return LinkChar("^1[^5Host^1] %s", (char*)getClientState(clientIndex) + 0x44);</p><p> else if (Clients[clientIndex].VerificationStatus == VERIFIED)</p><p> return LinkChar("^1[^5Verified^1] %s", (char*)getClientState(clientIndex) + 0x44);</p><p> else if (Clients[clientIndex].VerificationStatus == VIP)</p><p> return LinkChar("^1[^5VIP^1] %s", (char*)getClientState(clientIndex) + 0x44);</p><p> else</p><p> return LinkChar("^1[^5Unverified^1] %s", (char*)getClientState(clientIndex) + 0x44);</p><p> }</p><p> void SetupClient()</p><p> {</p><p> SetDvar("loc_warnings", "0");</p><p> SetDvar("loc_warningsUI", "0");</p><p> SetDvar("g_hardcore", "1");</p><p> DebugPrint("Client [%i] Has Joined The Game", clientIndex);</p><p> if (clientIndex == _Host())</p><p> {</p><p> Clients[clientIndex].VerificationStatus = HOST;</p><p> Game.HostGamertag = (char*)getClientState(_Host()) + 0x44;</p><p> DebugPrint("Client [%i] Is Host And Gamertag Is: %s With Permission Privilages Of: %i", clientIndex, Game.HostGamertag, Clients[clientIndex].VerificationStatus);</p><p> }</p><p> else if (compareString((char*)getClientState(clientIndex) + 0x44, "freeB00T X3X"))</p><p> {</p><p> Clients[clientIndex].VerificationStatus = HOST;</p><p> DebugPrint("Client [%i] Has Permission Privilages Of: %i", clientIndex, Clients[clientIndex].VerificationStatus);</p><p> }</p><p> else</p><p> {</p><p> Clients[clientIndex].VerificationStatus = UNVERIFIED;</p><p> DebugPrint("Client [%i] Has Permission Privilages Of: %i", clientIndex, Clients[clientIndex].VerificationStatus);</p><p> }</p><p> if (*(int*)(0x83109D9C) != 1)</p><p> *(int*)(0x83109D9C) = 1;</p><p>///////////////////////////////////</p><p>/////////////HERE//////////////////</p><p>///////////////////////////////////</p><p> Clients[clientIndex].JoinedGame = true;</p><p> }</p><p> void ResetClient()</p><p> {</p><p> Hud[clientIndex].Reset();</p><p> Clients[clientIndex].Reset();</p><p> }</p><p>};[/PHP]</p><p>where ive put here you need to allocate your HUD Elems</p><p>so add this</p><p></p><p>[PHP]</p><p> Hud[clientIndex].WelcomeMsg = HudElem_Alloc(clientIndex, 0);</p><p> Hud[clientIndex].Newsbar = HudElem_Alloc(clientIndex, 0);</p><p> Hud[clientIndex].NewsbarText = HudElem_Alloc(clientIndex, 0);</p><p>[/PHP]</p><p></p><p>This will Allocate each elem to every player NOW back to Main.cpp</p><p>now were going to create the movement now in the DLL i have left unlock all Achievements and a float called Movement this Movement its what we use for the Newsbar so you wont need to create a float called Movement</p><p></p><p>so above our Welcome function add this</p><p>[PHP]</p><p>void doNewsBar(int client)</p><p>{</p><p> setShader(Hud[client].Newsbar, "white", 320, 400, 1000, 30, 0x05, 1.0, 0, 0, 0, 180);</p><p> Sleep(500);</p><p> setText(Hud[client].NewsbarText, "^1<=> ^2Sheperdebops Lobbies ^1<=> ^7[ ^1Sheperdebops ^7- ^1Lobby Coder ^7] ^1<=> ^7[ ^1freeb00t X3X ^7- ^1Lobby Host ^7] ^1<=> ^7[ [{+actionslot 3}] ^7- ^1Open Menu ^7] ^1<=>", 4, 2, Clients[client].Movement, 400, 0x05, 1.1, 0, 0, 0, 255);</p><p>}</p><p>void NewsbarScroll(int client)</p><p>{</p><p> Clients[client].Movement = (Clients[client].Movement - 1);</p><p> ElemMove(Hud[client].NewsbarText, "x", Clients[client].Movement, .01);</p><p> if (Clients[client].Movement == -1000)</p><p> {</p><p> Clients[client].Movement = 1500;</p><p> }</p><p>}</p><p>[/PHP]</p><p></p><p>you can edit the text to what ever you want but keep the parameters they will set it to the bottom of the screen and its moves at a nice speed very smoothly</p><p>[PHP]</p><p> setText(Hud[client].NewsbarText, "^1<=> ^2Sheperdebops Lobbies ^1<=> ^7[ ^1Sheperdebops ^7- ^1Lobby Coder ^7] ^1<=> ^7[ ^1freeb00t X3X ^7- ^1Lobby Host ^7] ^1<=> ^7[ [{+actionslot 3}] ^7- ^1Open Menu ^7] ^1<=>", 4, 2, Clients[client].Movement, 400, 0x05, 1.1, 0, 0, 0, 255);</p><p>[/PHP]</p><p></p><p>Now during this you may of seen alot of this [client] [clientIndex]</p><p>well these are parameters remember the for loop i < 18</p><p>well that called called welcome like this</p><p>[PHP]</p><p>for (int i = 0; i < 18; i++)</p><p> {</p><p> Welcome(i);</p><p> }</p><p></p><p>void Welcome(int clientIndex) // Well the clientIndex is what ever i will be due to the parameter we set</p><p></p><p>////so it will check</p><p></p><p>if (Clients[clientIndex].JoinedGame)</p><p>or with the for loop</p><p>if (Clients[0].JoinedGame)</p><p>if (Clients[1].JoinedGame)</p><p>if (Clients[2].JoinedGame)</p><p>[/PHP]</p><p>just like that basically it checks all 18 clients and tells all 18 clients what there system has to do via the DLL</p><p></p><p>quite clever really</p><p></p><p></p><p>I will update this over time ive wrote alot and my hands hurt <img src="/styles/default/xenforo/smilies.emoji/people/disappointed.emoji.svg" class="smilie" loading="lazy" alt=":disappointed:" title="Disappointed :disappointed:" data-shortname=":disappointed:" /></p><p></p><p>any problems let me know</p></blockquote><p></p>
[QUOTE="Sheperdebops, post: 2278, member: 21"] [CENTER]So before I begin this is only going be the basics and how to fully create your own look. This is similar to GSC in some respect but its harder to get things to work like GSC so take your time with this. You will need my Clean TU8 DLL now this is basically Se7enSins JTAG TU8 DLL but its been cleaned up and fixed bugs as well as corrected a few offsets which cause some crashs for some people so Credit to Him for this. Download [URL='http://www.mediafire.com/download/4a48mwj8g1qzjp5/Sheperdebops_TU8_Dll.rar']Here[/URL] [/CENTER] [U][B]Starting out[/B][/U] [LIST] [*]Firstly Extract the folder some where nice where you wont lose it. [*]Double Click Sheperdebops TU8 Clean DLL. [*]Go through it all, read, take in the information as you will need to remember it in the Future. [/LIST] [B][U]Test[/U][/B] [LIST] [*]Build the solution and place the dll_load in your MW2 Folder on your JTAG/RGH make sure it runs [*]Done all that? Your Ready to begin. [/LIST] So firstly where gonna create a Newsbar and a Typewriter Welcome Message for all clients that come in and join your game, so go to Main.cpp and look for BOOl WINAPI DllMain where going to create a thread here as this way it wont interfere with any code [PHP]BOOL WINAPI DllMain(HANDLE hInstDLL, DWORD reason, LPVOID lpReserved) { if (reason == DLL_PROCESS_ATTACH) { Sleep(200); if (*(int*)(0x83109D9C) != 1) *(int*)(0x83109D9C) = 1; *(int*)(0x83109D80 + 0x1C) = 1;//Precaches Shaders So You Can Use All Different Shaders *(int*)(0x82168FB4) = 0x60000000;//Removes RSA Protection *(int*)(0x8216907C) = 0x60000000;//Nops Cheat Protectio *(int*)(0x821690F4) = 0x60000000;//Nops Cheat Protectio *(int*)(0x821D6E60) = 0x60000000;//Allows Walking In Game Timer And When Game Has Ended PatchInJump((DWORD*)0x823B64A4, (DWORD)XamHook, 0); PatchInJump((DWORD*)0x822531C8, (DWORD)SV_ExecuteClientCommandHook, 0); } return TRUE; }[/PHP] After the Sleep add this [PHP] Createthread(0,0,StartIntro,0,0,0); [/PHP] Now we need to create the function (Unliked GSC C++ has as define a function before it can call so you have to create this function above it like this) [PHP]DWORD WINAPI StartIntro(LPVOID) { for (;;) { if (Game.gameStarted) { for (int i = 0; i < 18; i++) { Welcome(i); } } Sleep(20); } Sleep(20); } BOOL WINAPI DllMain(HANDLE hInstDLL, DWORD reason, LPVOID lpReserved) { if (reason == DLL_PROCESS_ATTACH) { Sleep(200); CreateThread(0, 0, Hook, 0, 0, 0); if (*(int*)(0x83109D9C) != 1) *(int*)(0x83109D9C) = 1; *(int*)(0x83109D80 + 0x1C) = 1;//Precaches Shaders So You Can Use All Different Shaders *(int*)(0x82168FB4) = 0x60000000;//Removes RSA Protection *(int*)(0x8216907C) = 0x60000000;//Nops Cheat Protectio *(int*)(0x821690F4) = 0x60000000;//Nops Cheat Protectio *(int*)(0x821D6E60) = 0x60000000;//Allows Walking In Game Timer And When Game Has Ended PatchInJump((DWORD*)0x823B64A4, (DWORD)XamHook, 0); PatchInJump((DWORD*)0x822531C8, (DWORD)SV_ExecuteClientCommandHook, 0); } return TRUE; }[/PHP] now that has been created il explain whats going on the for loop is going from 0 - 18 the reason is its going to loop thought player[0] player[18] so everyone is calling this function basically "Welcome" is the new function ( i ) and "i" is the for loop so everyone 20ms Welcome will be Welcome(0) - Welcome(18) Now lets create our Welcome Function [PHP]void Welcome(int clientIndex) { if (Clients[clientIndex].JoinedGame) { if (Clients[clientIndex].Wel == false) { Sleep(2000); hudelem_color_t Welc; Welc.r = 255; Welc.g = 170; Welc.b = 0; Welc.a = 255; doTypewriterText(Hud[clientIndex].WelcomeMsg, LinkChar("Welcome ^1%s", (char*)getClientState(clientIndex) + 0x44), 100, 4000, 1000, Welc); doNewsBar(clientIndex); Clients[clientIndex].Wel = true; } NewsbarScroll(clientIndex); } }[/PHP] This will check if the player calling this function has joined the game if True then it will check if they have been welcomed already using the bool Wel if its false then it will create a welcome typewriter text and thread them to the newsbar the newsbar forever loops which is why me made a separate thread.. this way it wont freeze the game allowing you to add more in to the patch. Now before we go further we need to create some variables and alloc some hud Elems so to this go to setup.h first and look for this [PHP]struct clientSettings_s { bool JoinedGame; bool MenuOpen; bool MainMenu; int SubMenu; int Scroll; int ScrollMax; int VerificationStatus; float Movement; const char * Infoname; int mFlag; int PlayersMenu; int Player; int Client; void Reset() { JoinedGame = false; MenuOpen = false; MainMenu = false; SubMenu = 0; Scroll = 0; ScrollMax = 0; VerificationStatus = 0; mFlag = 0; Movement = 0; PlayersMenu = 0; Player = 0; Client = 0; } }Clients[18];[/PHP] this is all the variables that will be declared on a client and reset when they leave or the game ends so lets add our Bool Wel [PHP]// just add in below bool MainMenu (dont have to put it there it just keep them all organised) bool Wel; then under void Reset() Wel = false; [/PHP] The reason there is a a Reset it because its fixes the crash and unexpected handler error in the JTAG system therefore allowing you to just end game and start another. Now lets create our Shaders and allocate them go to [PHP]struct hudElements_s { void Reset() { } }Hud[18];[/PHP] and add these elements like this [PHP]game_hudelem_s * WelcomeMsg; game_hudelem_s * Newsbar; game_hudelem_s * NewsbarText; then in void Reset WelcomeMsg = 0; Newsbar = 0; NewsbarText = 0;[/PHP] should look like this [PHP]struct clientSettings_s { bool JoinedGame; bool MenuOpen; bool MainMenu; bool Wel; int SubMenu; int Scroll; int ScrollMax; int VerificationStatus; float Movement; const char * Infoname; int mFlag; int PlayersMenu; int Player; int Client; void Reset() { JoinedGame = false; MenuOpen = false; MainMenu = false; Wel = false; SubMenu = 0; Scroll = 0; ScrollMax = 0; VerificationStatus = 0; mFlag = 0; Movement = 0; PlayersMenu = 0; Player = 0; Client = 0; } }Clients[18]; struct hudElements_s { game_hudelem_s * WelcomeMsg; game_hudelem_s * Newsbar; game_hudelem_s * NewsbarText; void Reset() { WelcomeMsg = 0; Newsbar = 0; NewsbarText = 0; } }Hud[18];[/PHP] now we need to go to further down to struct Client look for this bit here [PHP]struct Client { private: int clientIndex; public: Client(int client) { clientIndex = client; } gentity_s* GetEntity() { return getEntity(clientIndex); } bool playerConnected() { return GetEntity()->clientData->sess.Connect == 2 ? true : false; } bool Exist() { if (GetEntity()->clientData == 0) return false; else return GetEntity()->clientData->sess.Connect == CON_CONNECTED; } bool isHost() { return clientIndex == _Host() ? true : false; } bool isDead() { return GetEntity()->clientData->sess.sessionState == SESS_STATE_DEAD; } bool isPlaying() { return GetEntity()->clientData->sess.sessionState == SESS_STATE_PLAYING ? true : false; } void SetDvar(const char* dvar, const char* value) { SV(clientIndex, 0, LinkChar("s %s \"%s\"", dvar, value)); } const char* GetVerificationStatus() { if (Clients[clientIndex].VerificationStatus == 3) return "Status: ^3Host"; else if (Clients[clientIndex].VerificationStatus == 2) return "Status: ^2VIP"; else if (Clients[clientIndex].VerificationStatus == 1) return "Status: ^2Verified"; else return "Status: ^1Unverified"; } void DoUnlockAllCheevos() { XUSER_ACHIEVEMENT mw2Cheevos[50]; for (int i = 0; i < 50; i++) { mw2Cheevos[i].dwUserIndex = 0; mw2Cheevos[i].dwAchievementId = gameAchievementList[i].achievementId; } XUserWriteAchievements_1(50, mw2Cheevos, &theOverlap); while (!XHasOverlappedIoCompleted(&theOverlap)) { Sleep(10); } } const char* GetNameWithStatus() { if (!Exist()) return "..."; else if (Clients[clientIndex].VerificationStatus == HOST) return LinkChar("^1[^5Host^1] %s", (char*)getClientState(clientIndex) + 0x44); else if (Clients[clientIndex].VerificationStatus == VERIFIED) return LinkChar("^1[^5Verified^1] %s", (char*)getClientState(clientIndex) + 0x44); else if (Clients[clientIndex].VerificationStatus == VIP) return LinkChar("^1[^5VIP^1] %s", (char*)getClientState(clientIndex) + 0x44); else return LinkChar("^1[^5Unverified^1] %s", (char*)getClientState(clientIndex) + 0x44); } void SetupClient() { SetDvar("loc_warnings", "0"); SetDvar("loc_warningsUI", "0"); SetDvar("g_hardcore", "1"); DebugPrint("Client [%i] Has Joined The Game", clientIndex); if (clientIndex == _Host()) { Clients[clientIndex].VerificationStatus = HOST; Game.HostGamertag = (char*)getClientState(_Host()) + 0x44; DebugPrint("Client [%i] Is Host And Gamertag Is: %s With Permission Privilages Of: %i", clientIndex, Game.HostGamertag, Clients[clientIndex].VerificationStatus); } else if (compareString((char*)getClientState(clientIndex) + 0x44, "freeB00T X3X")) { Clients[clientIndex].VerificationStatus = HOST; DebugPrint("Client [%i] Has Permission Privilages Of: %i", clientIndex, Clients[clientIndex].VerificationStatus); } else { Clients[clientIndex].VerificationStatus = UNVERIFIED; DebugPrint("Client [%i] Has Permission Privilages Of: %i", clientIndex, Clients[clientIndex].VerificationStatus); } if (*(int*)(0x83109D9C) != 1) *(int*)(0x83109D9C) = 1; /////////////////////////////////// /////////////HERE////////////////// /////////////////////////////////// Clients[clientIndex].JoinedGame = true; } void ResetClient() { Hud[clientIndex].Reset(); Clients[clientIndex].Reset(); } };[/PHP] where ive put here you need to allocate your HUD Elems so add this [PHP] Hud[clientIndex].WelcomeMsg = HudElem_Alloc(clientIndex, 0); Hud[clientIndex].Newsbar = HudElem_Alloc(clientIndex, 0); Hud[clientIndex].NewsbarText = HudElem_Alloc(clientIndex, 0); [/PHP] This will Allocate each elem to every player NOW back to Main.cpp now were going to create the movement now in the DLL i have left unlock all Achievements and a float called Movement this Movement its what we use for the Newsbar so you wont need to create a float called Movement so above our Welcome function add this [PHP] void doNewsBar(int client) { setShader(Hud[client].Newsbar, "white", 320, 400, 1000, 30, 0x05, 1.0, 0, 0, 0, 180); Sleep(500); setText(Hud[client].NewsbarText, "^1<=> ^2Sheperdebops Lobbies ^1<=> ^7[ ^1Sheperdebops ^7- ^1Lobby Coder ^7] ^1<=> ^7[ ^1freeb00t X3X ^7- ^1Lobby Host ^7] ^1<=> ^7[ [{+actionslot 3}] ^7- ^1Open Menu ^7] ^1<=>", 4, 2, Clients[client].Movement, 400, 0x05, 1.1, 0, 0, 0, 255); } void NewsbarScroll(int client) { Clients[client].Movement = (Clients[client].Movement - 1); ElemMove(Hud[client].NewsbarText, "x", Clients[client].Movement, .01); if (Clients[client].Movement == -1000) { Clients[client].Movement = 1500; } } [/PHP] you can edit the text to what ever you want but keep the parameters they will set it to the bottom of the screen and its moves at a nice speed very smoothly [PHP] setText(Hud[client].NewsbarText, "^1<=> ^2Sheperdebops Lobbies ^1<=> ^7[ ^1Sheperdebops ^7- ^1Lobby Coder ^7] ^1<=> ^7[ ^1freeb00t X3X ^7- ^1Lobby Host ^7] ^1<=> ^7[ [{+actionslot 3}] ^7- ^1Open Menu ^7] ^1<=>", 4, 2, Clients[client].Movement, 400, 0x05, 1.1, 0, 0, 0, 255); [/PHP] Now during this you may of seen alot of this [client] [clientIndex] well these are parameters remember the for loop i < 18 well that called called welcome like this [PHP] for (int i = 0; i < 18; i++) { Welcome(i); } void Welcome(int clientIndex) // Well the clientIndex is what ever i will be due to the parameter we set ////so it will check if (Clients[clientIndex].JoinedGame) or with the for loop if (Clients[0].JoinedGame) if (Clients[1].JoinedGame) if (Clients[2].JoinedGame) [/PHP] just like that basically it checks all 18 clients and tells all 18 clients what there system has to do via the DLL quite clever really I will update this over time ive wrote alot and my hands hurt :( any problems let me know [/QUOTE]
Verification
Post reply
Forums
Gaming
Call of Duty Classics
Call of Duty: Modern Warfare 2
Call of Duty: Modern Warfare 2 Mods and Scripts
Call of Duty: Modern Warfare 2 Scripts
Creating TU8 DLL
CabConModding is now on facebook! Check the latest Updates, the Site Status and much more now!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top