Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //This is a tutorial how to connect and attach, and setmemory in C#.
- //IMPORT your libraries needed...
- /*Make sure you have this in your project
- 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.IO;
- using System.Reflection;
- using System.Management;
- */
- using PS3Lib; //Makes PS3Lib available... Also make sure to add it to references!!
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- public PS3Lib.PS3API PS3 = new PS3Lib.PS3API(PS3Lib.SelectAPI.ControlConsole);//Sets Current API to Control Console
- //Make a label, and name it "connectionlabel" (without quotes)
- //Make 2 radiobuttons.
- //Your two radio buttons should look like this:
- private void radioButton1_CheckedChanged(object sender, EventArgs e)
- {
- PS3.ChangeAPI(PS3Lib.SelectAPI.ControlConsole);
- }
- private void radioButton2_CheckedChanged(object sender, EventArgs e)
- {
- PS3.ChangeAPI(PS3Lib.SelectAPI.TargetManager);
- }
- //Put the text on radio button1 as "CEX"
- //Put the text on radio button2 as "DEX"
- private void button1_Click(object sender, EventArgs e)
- {
- string API = PS3.GetCurrentAPIName();//This will get your current API... Whether its Control Console or TMAPI
- if (API == "Control Console")
- {
- //Make a textbox & name it "ipaddress" (without quotes)
- if (Convert.ToBoolean(PS3.ConnectTarget(ipaddress.Text)) == true)
- {
- PS3.AttachProcess();
- PS3.CCAPI.RingBuzzer(PS3Lib.CCAPI.BuzzerMode.Single);
- PS3.CCAPI.Notify(PS3Lib.CCAPI.NotifyIcon.FRIEND, "Connected and attached!");
- connectionlabel.Text = "Connected and Attached.";
- connectionlabel.ForeColor = Color.Black;
- }
- else
- {
- connectionlabel.Text = "Failed to Connect and Attach!";
- connectionlabel.ForeColor = Color.Red;
- }
- }
- else
- {
- if (Convert.ToBoolean(PS3.ConnectTarget()) == true)//This is for DEX to connect & attach
- {
- PS3.AttachProcess();
- connectionlabel.Text = "Connected and Attached.";
- connectionlabel.ForeColor = Color.Black;
- }
- else
- {
- connectionlabel.Text = "Failed to Connect and Attach!";
- connectionlabel.ForeColor = Color.Red;
- }
- }
- }
- //Make a button
- private void button5_Click(object sender, EventArgs e)
- {
- PS3.SetMemory(0x000000, 0x00);
- //MW3 name example
- PS3.Extension.WriteString(0x1BBBC2C, "^2BaSs^5_^2HaXoR");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement