Hello again all and welcome to part 4 ,please keep in mind I am still using TU4. Here is what my tool looks like after adding everything we will cover today http://www.youtube.com/watch?v=qS3T3KWGELI Today we are going to start off creating a class to store our offsets (optional). As I start to see my offsets pile up putting them in their own class with their own names only seemed the logical thing to do add a new class to your solution, something like "Offsets.cs",here is about the simplest setup, all public so we can use it anywhere using System; namespace RT3ME { public class Offsets { public UInt32 player = 0x8328A880; public UInt32 plaPri = 0x8328AD54; public UInt32 plaSec = 0x8328AD60; public UInt32 plaP1 = 0x8328AD3C; public UInt32 plaP2 = 0x8328AD48; public UInt32 SV_Send = 0x824B9AB0; public UInt32 fAutoAll = 0x82231614; public UInt32 supJmp = 0x820152A8; public UInt32 fallDMg = 0x8201B50C; public UInt32 gamTag = 0x8328D81C; } } ok so now we can use these new names in our cheats instead of the offset #'s which can get very confusing. Example: //near the top of our form code page we create an instance of our offset class, // similar to our XRPC instance, but this one has to be static or you will get an error public static Offsets of = new Offsets(); //now we use our instance followed by our offsets name instead of eye blurring numbers LOL x.SetMemory(of.fAutoAll, new byte[] { 0x3b, 0x40, 0x00, 0x00 }); one more optional thing, if you'd like to integrate my "ghosts sound player" into this project , grab it from here http://www.xpgamesaves.com/topic/92664-tu4-xrpc-cod-ghosts-sound-player/ So now lets re-create our jump height cheat using another winform tool called "trackbar". we want ours to have a total value of 3 (0-3 so really its 4 default 0,low 1, med 2, high 3) I have also added a label to mine to show this. so then we can use the same code from our numeric up/down box here just altering it a bit, we will use the switch setup //Fix fall damage x.SetMemory(of.fallDMg, new byte[] { 0x4F, 0xFF, 0x00, 0x00 }); //jVal is our variable used to "switch" based on our trackbars value int jVal = trackBar1.Value; switch (jVal) { //default case :shocked: x.SetMemory(0x820152A8, new byte[] { 0x42, 0x1c, 0x00, 0x00 }); break; //Low case 1: x.SetMemory(0x820152A8, new byte[] { 0x43, 0xFF, 0x00, 0x00 }); break; //Med case 2: x.SetMemory(0x820152A8, new byte[] { 0x45, 0xFF, 0x00, 0x00 }); break; //High case 3: x.SetMemory(0x820152A8, new byte[] { 0x48, 0xFF, 0x00, 0x00 }); break; } Now lets get into the fun stuff I don't know much about this since as I have said I am not a COD player, but I will show what I know so far! lets start by adding another trackbar to our project, we will use this for our "field of view" this one will have a total value of 4 (0-4 is really 5) because the angles we are going to use are 30,60,90,120,150 60 is default so we will also set the default value of our trackbar to 1 (0=30,1=60) mine looks like this now here's where things get a bit tricky, we are going to start using the SV_GameSendServerCommand offset to send various commands including dvar commands like this one,, we use the same switch setup as we did for our new jump height with our offset and command added //switch based on trackbar value int FOV = trackBar2.Value; switch (FOV) { //30 deg case :shocked: //we call SV_send and use "q" to poke dvar #13 to value 30 x.Call(of.SV_Send, 0, 0, "q 13 30"); break; //60 deg(default) case 1: //we call SV_send and use "q" to poke dvar #13 to value 60 x.Call(of.SV_Send, 0, 0, "q 13 60"); break; //rinse and repeate for all angle values case 2: x.Call(of.SV_Send, 0, 0, "q 13 90"); break; case 3: x.Call(of.SV_Send, 0, 0, "q 13 120"); break; case 4: x.Call(of.SV_Send, 0, 0, "q 13 150"); break; } Now lets add some checkboxes for a change of pace instead of an on and off button set. Here's mine first lets do "always show enemys on compass" if (showEnemyOnCompass.Checked == true) { //again call the SV and dvar #1 to a value of 1 for on x.Call(of.SV_Send, 0, 0, "q 1 1"); } if (showEnemyOnCompass.Checked == false) { //again call the SV and dvar #1 to a value of 0 for off x.Call(of.SV_Send, 0, 0, "q 1 0"); } third person if (thirdPerson.Checked == true) { //again call the SV and dvar #2 to a value of 1 for on x.Call(of.SV_Send, 0, 0, "q 2 1"); } if (thirdPerson.Checked == false) { //again call the SV and dvar #2 to a value of 0 for off x.Call(of.SV_Send, 0, 0, "q 2 0"); } the next 2 are not SV calls but we will use our player/ client index on these instead of the exact offset location Laser if (laser.Checked == true) { // @ our player plus 0x124 set the value to turn laser on x.SetMemory(PlayerState(Convert.ToUInt32(cliNumber.Value)) + 0x124, new byte[] { 0x00, 0x01, 0x00, 0x00 }); } if (laser.Checked == false) { // @ our player plus 0x124 set the value to turn laser off x.SetMemory(PlayerState(Convert.ToUInt32(cliNumber.Value)) + 0x124, new byte[] { 0x00, 0x00, 0x00, 0x00 }); } Spectate if (spectate.Checked == true) { // @ our player plus 0x10 set the value to turn spectate on x.SetMemory(PlayerState(Convert.ToUInt32(cliNumber.Value)) + 0x10, new byte[] { 0x00, 0x00, 0x20, 0x00 }); } if (spectate.Checked == false) { // @ our player plus 0x10 set the value to turn spectate off x.SetMemory(PlayerState(Convert.ToUInt32(cliNumber.Value)) + 0x10, new byte[] { 0x00, 0x00, 0x00, 0x00 }); } and finally FPS on screen, this can be a good staring point for a mod menu if (fPS.Checked == true) { //set value to turn on FPS text x.SetMemory(0x8251DC34, new byte[] { 0x40, 0x9a, 0x00, 0x8c }); } if (fPS.Checked == false) { //set value to turn off FPS text x.SetMemory(0x8251DC34, new byte[] { 0x41, 0x9a, 0x00, 0x8c }); } Well now I seem to have an empty space in my tool so lets add one more thing quick, it will use text commands with our SV offset add a couple text boxes and a couple buttons ,,here's mine this can use any of the following color codes by number(may be more not sure) ^0 - Black ^1 - Red ^2 - Green ^3 - Yellow ^4 - Blue ^5 - Cyan ^6 - Purple ^7 - Default for the text sender we use "c" in our text line x.Call(of.SV_Send, 0, 0, sendBox.Text); //an example of something using colors to send to a client // c "^1begallegal1 ^2XPGamesaves.com" for the "kick with error" we use "r" x.Call(of.SV_Send, 0, 0, kickBox.Text); //an example of something using colors give error when kicking from game // r "^1begallegal1 ^2XPGamesaves.com" enjoy and happy coding :begal:
Not to sound like a know it all, but iirc, FOV values for arbitrary and don't really have any unit. Never the less, excellent tutorial series begal
A great tut like this on how to dump/find/extract the offsets would be great would go great with this as this is as long as you already know all of the offsets, great work mate