Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //SRC: http://www.nextgenupdate.com/forums/modern-warfare-3-questions-inquiries/723221-c-mw3-get-client-names-using-datagridview-help.html
- // jwm614 on Nextgenupdate
- using PS3Lib;
- using System;
- using System.Text;
- public class Form1 {
- private static PS3API PS3 = new PS3API();
- //first add this
- private uint NameAddress = 0x0110D694;
- public string GetName(int client)
- {
- byte[] buffer = new byte[20];
- GetMemory(NameAddress + 0X3980 * (uint)client, buffer);
- string names = Encoding.ASCII.GetString(buffer);
- names = names.Replace("\0", "");
- return names;
- }
- //then put in a button/timer
- dataGridView1.Enabled = true; dataGridView1.RowCount = 18;
- for (int i = 0; i < 18; i++)
- {
- dataGridView1.Update();
- dataGridView1.Rows[i].Cells[0].Value = i;
- dataGridView1.Rows[i].Cells[1].Value = GetName(i);
- }
- /*if you want to change a clients name use this in a menustrip
- int Client = dataGridView1.CurrentRow.Index;
- string a = Interaction.InputBox("New name: ", "Name Change", GetName(Client), -1, -1);
- byte[] NewName = Encoding.ASCII.GetBytes(a + "\0");
- SetMemory(NameAddress + (uint)Client * 0X3980, NewName);
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement