Post: [DEX] How To Display Players Name
06-21-2013, 01:50 PM #1
nay1995
The Master
(adsbygoogle = window.adsbygoogle || []).push({}); Using my method, players names can be displayed either in the program or displayed in the menu.

Note: I will show you how to do this in c#, so if you would like other languages just work around it Smile

Anyway all you have to do is first copy this code to your program:
    
public static string ByteToString(byte[] nay)
{
string hex = BitConverter.ToString(nay);
return hex.Replace("-", "");
}

What this does is simply convert a byte array to its string equivalent (hex string).

Now you will need this code:
    
private string HA(string h)
{
StringBuilder nay = new StringBuilder();

for (int i = 0; i <= h.Length - 2; i += 2)
{
nay.Append(Convert.ToString(Convert.ToChar(Int32.Parse(h.Substring(i, 2),
System.Globalization.NumberStyles.HexNumber))));

}
nay.Replace((char)0x00, ' 'Winky Winky;
return nay.ToString();
}

What this does is convert a hex string to there equivalent characters and then replaces all null values.


Then finally you will need this:
    
public string p(ulong i)
{
byte[] ps3num = new byte[31];
PS3TMAPI.ProcessGetMemory(0, PS3TMAPI.UnitType.PPU, ProcessID, 0, 0x0110D694 + (i * 0x3980), ref ps3num);

string s = HA(ByteToString(ps3num));
s = s.Trim();
return s;
}

This code gets the memory of the player state and converts it to a readable string.



Thats all you need!

If you want to get someones name simply type something like this:
MessageBox.Show(""+p(clientID here));

To get all clients names do something like this:
    
MessageBox.Show(""+p(0) + "\n" +p(1) + "\n" +p(2) + "\n" +p(3) + "\n" +p(4) + "\n" +p(5) + "\n" +p(6) + "\n" +p(7) + "\n" +p(Cool Man (aka Tustin) + "\n" +p(9) + "\n" +p(10) + "\n" +p(11) + "\n" +p(12) + "\n" +p(13) + "\n" +p(14) + "\n" +p(15) + "\n" +p(16) + "\n" +p(17));


This is how i do it, its not the best way and im sure other dex modders have their own methods, anyway i hope you enjoy!


Credits to IMCSx for the player offsets.
Last edited by nay1995 ; 06-21-2013 at 02:02 PM.

The following 7 users say thank you to nay1995 for this useful post:

{H} | Exception, gianluca33, milky4444, MrKiller261, O-H, TheUnexpected,
06-21-2013, 02:04 PM #2
Sonoro
I like anteaters
Originally posted by nay1995 View Post
Using my method, players names can be displayed either in the program or displayed in the menu.

Note: I will show you how to do this in c#, so if you would like other languages just work around it Smile

Anyway all you have to do is first copy this code to your program:
    
public static string ByteToString(byte[] nay)
{
string hex = BitConverter.ToString(nay);
return hex.Replace("-", "");
}

What this does is simply convert a byte array to its string equivalent (hex string).

Now you will need this code:
    
private string HA(string h)
{
StringBuilder nay = new StringBuilder();

for (int i = 0; i <= h.Length - 2; i += 2)
{
nay.Append(Convert.ToString(Convert.ToChar(Int32.Parse(h.Substring(i, 2),
System.Globalization.NumberStyles.HexNumber))));

}
nay.Replace((char)0x00, ' 'Winky Winky;
return nay.ToString();
}

What this does is convert a hex string to there equivalent characters and then replaces all null values.


Then finally you will need this:
    
public string p(ulong i)
{
byte[] ps3num = new byte[31];
PS3TMAPI.ProcessGetMemory(0, PS3TMAPI.UnitType.PPU, ProcessID, 0, 0x0110D694 + (i * 0x3980), ref ps3num);

string s = HA(ByteToString(ps3num));
s = s.Trim();
return s;
}

This code gets the memory of the player state and converts it to a readable string.



Thats all you need!

If you want to get someones name simply type something like this:
MessageBox.Show(""+p(clientID here));

To get all clients names do something like this:
    
MessageBox.Show(""+p(0));
MessageBox.Show(""+p(1));
MessageBox.Show(""+p(2));
MessageBox.Show(""+p(3));
MessageBox.Show(""+p(4));
MessageBox.Show(""+p(5));
MessageBox.Show(""+p(6));
MessageBox.Show(""+p(7));
MessageBox.Show(""+p(Cool Man (aka Tustin));
MessageBox.Show(""+p(9));
MessageBox.Show(""+p(10));
MessageBox.Show(""+p(11));
MessageBox.Show(""+p(12));
MessageBox.Show(""+p(13));
MessageBox.Show(""+p(14));
MessageBox.Show(""+p(15));
MessageBox.Show(""+p(16));
MessageBox.Show(""+p(17));


This is how i do it, its not the best way and im sure other dex modders have their own methods, anyway i hope you enjoy!


Credits to IMCSx for the player offsets.



Not sure if serious, this is just some messy code to do a simple thing...

    public static string GetPlayerName(int clientID)
{
byte[] GetName = new byte[16];
PS3TMAPI.ProcessGetMemory(0, PS3TMAPI.UnitType.PPU, ProcessID, 0, 0x0110D694 + ((uint)clientID * 0x3980), ref GetName);
return Encoding.ASCII.GetString(GetName);
}

The following 3 users say thank you to Sonoro for this useful post:

Hacker41822, Sal, TheFallen
06-21-2013, 02:07 PM #3
Originally posted by Dr
Not sure if serious, this is just some messy code to do a simple thing...

    public static string GetPlayerName(int clientID)
{
byte[] GetName = new byte[16];
PS3TMAPI.ProcessGetMemory(0, PS3TMAPI.UnitType.PPU, ProcessID, 0, 0x0110D694 + ((uint)clientID * 0x3980), ref GetName);
return Encoding.ASCII.GetString(GetName);
}


Hahaha, Thanks
06-21-2013, 02:07 PM #4
MoTmrD
Banned
Thank you my friend send Skype
06-21-2013, 02:21 PM #5
nay1995
The Master
Originally posted by Dr
Not sure if serious, this is just some messy code to do a simple thing...

    public static string GetPlayerName(int clientID)
{
byte[] GetName = new byte[16];
PS3TMAPI.ProcessGetMemory(0, PS3TMAPI.UnitType.PPU, ProcessID, 0, 0x0110D694 + ((uint)clientID * 0x3980), ref GetName);
return Encoding.ASCII.GetString(GetName);
}


haha very nice, i wouldnt say its messy. but in my past using ascii to convert ran me into problems such as slowing of program and in some cases freezing when called multiple times, but thats just me.
06-21-2013, 03:04 PM #6
Sonoro
I like anteaters
Originally posted by nay1995 View Post
haha very nice, i wouldnt say its messy. but in my past using ascii to convert ran me into problems such as slowing of program and in some cases freezing when called multiple times, but thats just me.


If that slowed down your program, i can't image about this one you posted lol

The following user thanked Sonoro for this useful post:

Taylor
06-21-2013, 03:08 PM #7
Originally posted by nay1995 View Post
Using my method, players names can be displayed either in the program or displayed in the menu.

Note: I will show you how to do this in c#, so if you would like other languages just work around it Smile

Anyway all you have to do is first copy this code to your program:
    
public static string ByteToString(byte[] nay)
{
string hex = BitConverter.ToString(nay);
return hex.Replace("-", "");
}

What this does is simply convert a byte array to its string equivalent (hex string).

Now you will need this code:
    
private string HA(string h)
{
StringBuilder nay = new StringBuilder();

for (int i = 0; i <= h.Length - 2; i += 2)
{
nay.Append(Convert.ToString(Convert.ToChar(Int32.Parse(h.Substring(i, 2),
System.Globalization.NumberStyles.HexNumber))));

}
nay.Replace((char)0x00, ' 'Winky Winky;
return nay.ToString();
}

What this does is convert a hex string to there equivalent characters and then replaces all null values.


Then finally you will need this:
    
public string p(ulong i)
{
byte[] ps3num = new byte[31];
PS3TMAPI.ProcessGetMemory(0, PS3TMAPI.UnitType.PPU, ProcessID, 0, 0x0110D694 + (i * 0x3980), ref ps3num);

string s = HA(ByteToString(ps3num));
s = s.Trim();
return s;
}

This code gets the memory of the player state and converts it to a readable string.



Thats all you need!

If you want to get someones name simply type something like this:
MessageBox.Show(""+p(clientID here));

To get all clients names do something like this:
    
MessageBox.Show(""+p(0) + "\n" +p(1) + "\n" +p(2) + "\n" +p(3) + "\n" +p(4) + "\n" +p(5) + "\n" +p(6) + "\n" +p(7) + "\n" +p(Cool Man (aka Tustin) + "\n" +p(9) + "\n" +p(10) + "\n" +p(11) + "\n" +p(12) + "\n" +p(13) + "\n" +p(14) + "\n" +p(15) + "\n" +p(16) + "\n" +p(17));


This is how i do it, its not the best way and im sure other dex modders have their own methods, anyway i hope you enjoy!


Credits to IMCSx for the player offsets.


You must login or register to view this content. Smile
06-21-2013, 03:24 PM #8
nay1995
The Master
Originally posted by Dr
If that slowed down your program, i can't image about this one you posted lol


haha its an improvement on my system, no word of a lie, its been fine for me, i used ascii converter at the start of my project and it just ran me into problems and when i was returning a string it took to long to convert therefore causing my ps3 to crash as other functions around it needed the string to function correctly. for example i was running a loop for one of my functions and i needed to know when a certain value had changed and whether it changed correctly if it did break the operation if not carry on, using ascii took to long therefore the loop lasted longer than expected causing bytes to be written to the wrong addresses, if that made sense, thats why i scrapped it.
06-21-2013, 03:48 PM #9
Or use this : You must login or register to view this content. :

    DEX.Extension.ReadString(uint offset);


1 line.
Last edited by iMCSx ; 06-21-2013 at 03:51 PM.

The following 2 users say thank you to iMCSx for this useful post:

InfinityISB4CK, Taylor
06-21-2013, 03:50 PM #10
nay1995
The Master
Originally posted by FM
Or use the You must login or register to view this content. :

    DEX.Extension.ReadString(uint offset);


1 line.


very nice ile try this out :y: , when did ps3Lib 3 get released?

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo