Solved Trainer C# ByteConverter problem

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat
Status
Not open for further replies.

ORR

Newbie
Full Member
Oct 31, 2012
7
252
0
I am currently following your tutorial on how to make a trainer in c#, I got everything going good until in video 4 when you were putting in the first timer codes and reach the line: byte [] valueToWrite = ByteConverter.GetByte(AmmoToFill);. When you reachto the end of ByteConverter[/Iand place Dot,] adrop down window appears that gives you the GETBYTE[/] option, but no matter how i try i can't get mine. And if i write it in manually i get;{System.ComponentModel.ByteConverter'does not contain a definition for 'GetByte'.So now the whole trainer is on pause, what can i do to correct it.:confused:

I am using VS 2010 Ultimate. Thank you very much:cool:
 

Fleep

Founder
Meme Tier VIP
May 20, 2012
572
11,023
6
Hey there ORR sorry for the late response but this should be your answer.
Your supposed to be using BITConverter and not BYTEConverter.

Replace your line of code with this

C++:
                    byte[] valueToWrite = BitConverter.GetBytes(AmmoToFill);
Also in future please use
C++:
code tags
to wrap your code in.

Fleep
 

c5

Kim Kong Trasher
Dank Tier VIP
Dank Tier Donator
Jul 19, 2012
1,188
12,638
76
If I remember correctly ctrl+space enables that drop down thingy. I don't think that's the problem for you though. You are probably lacking some classes (haven't included them)
 

ORR

Newbie
Full Member
Oct 31, 2012
7
252
0
Thank you,but can you tell me which class i may be missing and how can i included them?:)
 

c5

Kim Kong Trasher
Dank Tier VIP
Dank Tier Donator
Jul 19, 2012
1,188
12,638
76
You are lacking a class which contains GetByte, or you just have implemented it wrong, or doing something wrong. I don't know, I haven't watched that tutorial :D
 

ORR

Newbie
Full Member
Oct 31, 2012
7
252
0
THIS IS AS FAR AS I REACH:



using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Globalization;
using System.Threading;

namespace VirtuaCop_2_Trainer
{
public partial class Form1 : Form
{
#region Global Variables
Memory mymemory = new Memory();
Process[] myprocess;
bool IsGameavailable = false;

bool UnlimitedAmmo = false;
string AmmoPointer = "004CF1AC";
int[] AmmoOffset = {0*28};
int AmmoToFill = 6;

#endregion


public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{

}

private void button3_Click(object sender, EventArgs e)
{

}

private void UnlimitedAmmoBTN_Click(object sender, EventArgs e)
{
if (IsGameavailable)
{
if (UnlimitedAmmo)
{
UnlimitedAmmo = false;
UnlimitedAmmoBTN.Text = "1.OFF";
}
else
{
UnlimitedAmmo = true;
UnlimitedAmmoBTN.Text = "1.ON";
}
}
}

private void GameAvailabilityTimer_Tick(object sender, EventArgs e)
{
myprocess = Process.GetProcessesByName("VCop2");
if (myprocess.Length > 0)
{
IsGameavailable = true;
Statuslabel.Text = "Status VCop2 is availalbe";
}
else
{
IsGameavailable = false;
Statuslabel.Text = "Status VCop2 is not availalbe";
}
}

private void UpdateCheatTimer_Tick(object sender, EventArgs e)
{
if (IsGameavailable)
{
#region unlimited Ammo
if(UnlimitedAmmo)
{
mymemory.ReadProcess = myprocess[0];
mymemory.Open();
int pointerAddress = HexToDec(AmmoPointer);
int [] pointerOffset = AmmoOffset;
int byteswritten;
byte[] valueToWrite = ByteConverter.GetByte(AmmoToFill);
string writtenaddress = mymemory.PointerWrite((IntPtr)pointerAddress, valueToWrite, pointerOffset,out byteswritten);
mymemory.CloseHandle();
}
#endregion
}
}

public static string HexToDec(int Dec)
{
return Dec.ToString("x");
}

public static int HexToDec(string Hex)
{
return int.Parse (Hex, NumberStyles.HexNumber);
}

}

}
 

ORR

Newbie
Full Member
Oct 31, 2012
7
252
0
Same problem i tried uninstalling VS 10 Ultimate and reinstalling it to see if it will solve the problem, but it is still the same problem.After i write this line: byte[] valueToWrite = ByteConverter.(The drop down window give me 3 options ONLY, they are : Equals ;ReferanceEquals ; StandardValueCollection.If i am missing a class, can someone please tell me which one. P.S Ialso tried VS 2012 and had the same problem. Thanks in advance:;)
 

cheapthrill

Newbie
Aug 3, 2012
3
212
0
not sure if you fixed it yet?

byte[] valueToWrite = ByteConverter.GetByte(AmmoToFill); <----should be ByteConverter.GetBytes
 

ORR

Newbie
Full Member
Oct 31, 2012
7
252
0
Thank You Fleep,Thank You Very MUCH.It worked you are TRUELY THE BEST.
 
Status
Not open for further replies.
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods League of Legends Accounts