Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    PvPlayer's Avatar
    Join Date
    Dec 2013
    Gender
    male
    Posts
    19
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by Lovroman View Post

    Code:
    CC.Write._Int64(0x1444C2E40, Convert.ToInt64(squadpoints.Text));
    to
    Code:
    CC.Write._Int32(0x1444C2E40, Convert.ToInt32(squadpoints.Text));
    That's what I meant.
    Fixed, thanks a lot for the help!
    Last edited by PvPlayer; 12-10-2013 at 03:47 PM.

  2. #17
    殺す必要がある唯一のものは殺されるために準備され人 々である。
    Premium Member
    Hitokiri~'s Avatar
    Join Date
    Oct 2012
    Gender
    female
    Location
    Cancer.
    Posts
    1,201
    Reputation
    24
    Thanks
    937
    My Mood
    Bitchy
    Heres The correct code or the code that i like to do. Think that its the old Memory Class But it should work:
     
    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;

    namespace Squad_Points
    {
    public partial class Form1 : Form
    {
    public Form1()
    {

    InitializeComponent();
    }

    private void button1_Click(object sender, EventArgs e)
    {
    CC.ProcessName = "iw6mp64_ship";
    CC.Write._Int32(0x1444C2E40, int.Parse(textBox1.Text)); //Dont know if thats the right address i just put that in there fast.
    }
    class CC
    {
    private static string ProcName = "";
    private static IntPtr pHandle = IntPtr.Zero;
    [System.Runtime.InteropServices.DllImport("kernel32 .dll", SetLastError = true)]
    static extern bool WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] lpBuffer, int nSize, out IntPtr lpNumberOfBytesWritten);
    [System.Runtime.InteropServices.DllImport("kernel32 .dll", SetLastError = true)]
    static extern bool ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [System.Runtime.InteropServices.Out] byte[] lpBuffer, int dwSize, out IntPtr lpNumberOfBytesRead);

    public static string ProcessName
    { get { return ProcName; } set { if (System.Diagnostics.Process.GetProcessesByName(val ue).Length != 0) { pHandle = System.Diagnostics.Process.GetProcessesByName(valu e)[0].Handle; ProcName = value; } else { System.Windows.Forms.MessageBox.Show(value + "\n\n Not Found!", "Error:" + value, System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); ProcName = ""; } } }

    public class Write
    {
    public static void _Int16(Int64 Address, Int16 Value)
    {
    if (System.Diagnostics.Process.GetProcessesByName(Pro cName).Length != 0)
    {
    IntPtr retByt;
    WriteProcessMemory(pHandle, new IntPtr(Address), BitConverter.GetBytes(Value), sizeof(Int16), out retByt);
    }
    }
    public static void _Int32(Int64 Address, Int32 Value)
    {
    if (System.Diagnostics.Process.GetProcessesByName(Pro cName).Length != 0)
    {
    IntPtr retByt;
    WriteProcessMemory(pHandle, new IntPtr(Address), BitConverter.GetBytes(Value), sizeof(Int32), out retByt);
    }
    }
    public static void _Int64(Int64 Address, Int64 Value)
    {
    if (System.Diagnostics.Process.GetProcessesByName(Pro cName).Length != 0)
    {
    IntPtr retByt;
    WriteProcessMemory(pHandle, new IntPtr(Address), BitConverter.GetBytes(Value), sizeof(Int64), out retByt);
    }
    }
    public static void _Float(Int64 Address, Single Float)
    {
    if (System.Diagnostics.Process.GetProcessesByName(Pro cName).Length != 0)
    {
    IntPtr retByt;
    WriteProcessMemory(pHandle, new IntPtr(Address), BitConverter.GetBytes(Float), sizeof(Single), out retByt);
    }
    }
    public static void _String(Int64 Address, String Value)
    {
    if (System.Diagnostics.Process.GetProcessesByName(Pro cName).Length != 0)
    {
    IntPtr retByt;
    WriteProcessMemory(pHandle, new IntPtr(Address), ASCIIEncoding.ASCII.GetBytes(Value), sizeof(Int64), out retByt);
    }
    }
    public static void _Bytes(Int64 Address, Byte[] Value)
    {
    if (System.Diagnostics.Process.GetProcessesByName(Pro cName).Length != 0)
    {
    IntPtr retByt;
    WriteProcessMemory(pHandle, new IntPtr(Address), Value, Value.Length, out retByt);
    }
    }
    }
    public class Read
    {
    public static Int16 _Int16(Int64 Address)
    {
    if (System.Diagnostics.Process.GetProcessesByName(Pro cName).Length != 0)
    {
    IntPtr retByt; Byte[] buffer = new Byte[sizeof(Int16)];
    ReadProcessMemory(pHandle, new IntPtr(Address), buffer, sizeof(Int16), out retByt);
    return BitConverter.ToInt16(buffer, 0);
    }
    else return 0;
    }
    public static Int32 _Int32(Int64 Address)
    {
    if (System.Diagnostics.Process.GetProcessesByName(Pro cName).Length != 0)
    {
    IntPtr retByt; Byte[] buffer = new Byte[sizeof(Int32)];
    ReadProcessMemory(pHandle, new IntPtr(Address), buffer, sizeof(Int32), out retByt);
    return BitConverter.ToInt32(buffer, 0);
    }
    else return 0;
    }
    }
    }
    }
    }

Page 2 of 2 FirstFirst 12

Similar Threads

  1. [HELP] Why is this not working :\
    By skulhead in forum C++/C Programming
    Replies: 11
    Last Post: 03-10-2011, 01:57 AM
  2. [Help] Why is this not working...
    By skulhead in forum WarRock Hack Source Code
    Replies: 30
    Last Post: 03-05-2011, 06:42 PM
  3. Why does this not work?
    By extremehack in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 8
    Last Post: 08-15-2010, 09:47 AM
  4. [Info] NEWS ABOUT DAVES NEW PUB HACK (WHY IT DOSE NOT WORK)
    By El1te in forum CrossFire Hacks & Cheats
    Replies: 10
    Last Post: 04-30-2010, 10:09 PM
  5. IMPORTANT WHY CA IS NOT WORKING......
    By Dested in forum Combat Arms Discussions
    Replies: 29
    Last Post: 10-28-2009, 11:14 PM