Solved.NET Reflector

Posts 1–8 of 8 · Page 1 of 1
.NET Reflector
Hello,
i have search on the forum for find how to make a ESP, i know i need to decompile Assembly-CSharp. I do it.
but my problem it's i don't find where i can find the ESP (i have decompile MSZ by manitou) but i really don't find how to make the ESP. I have really all tutorial for this but i didn't find..

Thanks for you'r help and sorry for my english XD
Quote Originally Posted by CrusXkkk View Post
Hello,
i have search on the forum for find how to make a ESP, i know i need to decompile Assembly-CSharp. I do it.
but my problem it's i don't find where i can find the ESP (i have decompile MSZ by manitou) but i really don't find how to make the ESP. I have really all tutorial for this but i didn't find..

Thanks for you'r help and sorry for my english XD
As you said .net reflector is for decompiling while an ESP will be programmed. Try visual studio instead of .net reflector.
Ok thanks.
But what file it's used for the ESP because when i decompile i have so many .cs so i don't know what is the good file :/
Quote Originally Posted by CrusXkkk View Post
Ok thanks.
But what file it's used for the ESP because when i decompile i have so many .cs so i don't know what is the good file :/
Making an esp will not involve decompiling anything. You will have to program an esp.
Ok good, but i'm beginner of Unturned hack so i don't understand i need to make a .dll and inject him to game or i add only .cs of Assembly-CSharp with a auto-inject ?

 
Source Code
public class Esp
{
private MonoBehaviour[] objects = null;
private MonoBehaviour type = null;
private int espskip = 0;
public bool enabled = false;
public Esp(MonoBehaviour theobject)
{
this.type = theobject;
}
public void dispesp()
{
if (this.enabled)
{
this.updateespitem();
int i = 0;
while (i < this.objects.Length)
{
try
{
MonoBehaviour monoBehaviour = this.objects[i];
float num = Vector3.Distance(monoBehaviour.transform.position, Camera.main.transform.position);
if (num <= EspEnable.espDist && !monoBehaviour.Equals(Helper.getMe()))
{
string text = monoBehaviour.GetType().ToString();
string name = monoBehaviour.name;
if (text == "Item")
{
name = ItemName.getName(System.Convert.ToInt32(monoBehavi our.name));
}
string text2 = string.Concat(new string[]
{
text,
"\n",
name,
"\nDist:",
num.ToString(),
"M"
});
Vector3 position = monoBehaviour.transform.position;
Vector3 vector = Helper.getCamera().WorldToScreenPoint(position);
if (vector.z >= 0f)
{
vector = new Vector2(vector.x, (float)Screen.height - vector.y);
int num2 = (int)((EspEnable.espDist - num) / EspEnable.espDist * 16f);
if (num2 == 0)
{
num2 = 1;
}
GUI.skin.label.fontSize = num2;
Vector2 vector2 = GUI.skin.label.CalcSize(new GUIContent(text2));
GUI.color = Color.green;
GUI.Label(new Rect(vector.x - vector2.x / 2f, vector.y, vector2.x, vector2.y), text2);
}
}
}
catch (System.Exception ex)
{
string message = ex.Message;
}
IL_1F3:
i++;
continue;
goto IL_1F3;
}
}
}
private void updateespitem()
{
if (this.espskip > 150 || this.objects == null)
{
this.objects = (UnityEngine.Object.FindObjectsOfType(this.type.Ge tType()) as MonoBehaviour[]);
this.espskip = 0;
}
this.espskip++;
}
}

public class EspEnable
{
public static Rect EspWindow = new Rect(0f, 0f, 190f, 400f);
public static float espDist = 300f;
public static void drawESP(int id)
{
float num = 0f;
Hacks.esp = GUI.Toggle(new Rect(10f, num += 25f, 130f, 20f), Hacks.esp, "Esp On/Off");
if (Hacks.esp)
{
GUI.skin.label.fontSize = 12;
GUI.Label(new Rect(0f, num += 25f, 120f, 20f), "Esp Range:" + (int)EspEnable.espDist + "M");
EspEnable.espDist = GUI.HorizontalSlider(new Rect(10f, num += 25f, 100f, 30f), EspEnable.espDist, 100f, 5000f);
Hacks.playeresp.enabled = GUI.Toggle(new Rect(10f, num += 25f, 120f, 20f), Hacks.playeresp.enabled, "Player Esp");
Hacks.zombieesp.enabled = GUI.Toggle(new Rect(10f, num += 25f, 120f, 20f), Hacks.zombieesp.enabled, "Zombie Esp");
Hacks.trapesp.enabled = GUI.Toggle(new Rect(10f, num += 25f, 120f, 20f), Hacks.trapesp.enabled, "Trap Esp");
Hacks.itemesp.enabled = GUI.Toggle(new Rect(10f, num += 25f, 120f, 20f), Hacks.itemesp.enabled, "Item Esp");
Hacks.crateesp.enabled = GUI.Toggle(new Rect(10f, num += 25f, 120f, 20f), Hacks.crateesp.enabled, "Crate Esp");
Hacks.lockedCrateesp.enabled = GUI.Toggle(new Rect(10f, num += 25f, 120f, 20f), Hacks.lockedCrateesp.enabled, "LockedCrate Esp");
Hacks.vehicleesp.enabled = GUI.Toggle(new Rect(10f, num += 25f, 120f, 20f), Hacks.vehicleesp.enabled, "Vehicle Esp");
Hacks.animalesp.enabled = GUI.Toggle(new Rect(10f, num + 25f, 120f, 20f), Hacks.animalesp.enabled, "Animal Esp");
}
GUI.DragWindow();
}
}

internal static class Helper
{
public static float scrHeight = (float)Screen.height;
public static float scrWidth = (float)Screen.width;
private static Camera mainCamera = null;
private static long cameraTime = 0L;
private static Player[] players = null;
private static long playersTime = 0L;
private static Player me = null;
private static long meTime = 0L;
private static CharacterController characterController = null;
private static long characterControllerTime = 0L;
public static Camera getCamera()
{
if (Helper.getTimeStamp() - Helper.cameraTime > 1L || Helper.mainCamera == null)
{
Helper.mainCamera = Camera.main;
Helper.scrHeight = (float)Screen.height;
Helper.scrWidth = (float)Screen.width;
Helper.cameraTime = Helper.getTimeStamp();
}
return Helper.mainCamera;
}
public static Player[] getPlayers()
{
if (Helper.getTimeStamp() - Helper.playersTime > 1L || Helper.players == null)
{
Helper.players = UnityEngine.Object.FindObjectsOfType<Player>();
Helper.playersTime = Helper.getTimeStamp();
}
return Helper.players;
}
public static Player getMe()
{
if (Helper.getTimeStamp() - Helper.meTime > 1L || Helper.me == null)
{
Player[] array = UnityEngine.Object.FindObjectsOfType<Player>();
for (int i = 0; i < array.Length; i++)
{
Player player = array;
if (player.networkView.isMine)
{
Helper.me = player;
}
}
Helper.meTime = Helper.getTimeStamp();
}
return Helper.me;
}
public static CharacterController getCharacterController()
{
if (Helper.getTimeStamp() - Helper.characterControllerTime > 1L || Helper.characterController == null)
{
Helper.characterController = UnityEngine.Object.FindObjectOfType<CharacterContr oller>();
Helper.characterControllerTime = Helper.getTimeStamp();
}
return Helper.characterController;
}
public static long getTimeStamp()
{
System.DateTime dateTime = new System.DateTime(1970, 1, 1);
return (System.DateTime.UtcNow.Ticks - dateTime.Ticks) / 10000000L;
}
}


You have here my source code (find on internet) can you think it(s work ? or i need to make a new ?

Thanks so much for you'r help
Quote Originally Posted by CrusXkkk View Post
Ok good, but i'm beginner of Unturned hack so i don't understand i need to make a .dll and inject him to game or i add only .cs of Assembly-CSharp with a auto-inject ?

 
Source Code
public class Esp
{
private MonoBehaviour[] objects = null;
private MonoBehaviour type = null;
private int espskip = 0;
public bool enabled = false;
public Esp(MonoBehaviour theobject)
{
this.type = theobject;
}
public void dispesp()
{
if (this.enabled)
{
this.updateespitem();
int i = 0;
while (i < this.objects.Length)
{
try
{
MonoBehaviour monoBehaviour = this.objects[i];
float num = Vector3.Distance(monoBehaviour.transform.position, Camera.main.transform.position);
if (num <= EspEnable.espDist && !monoBehaviour.Equals(Helper.getMe()))
{
string text = monoBehaviour.GetType().ToString();
string name = monoBehaviour.name;
if (text == "Item")
{
name = ItemName.getName(System.Convert.ToInt32(monoBehavi our.name));
}
string text2 = string.Concat(new string[]
{
text,
"\n",
name,
"\nDist:",
num.ToString(),
"M"
});
Vector3 position = monoBehaviour.transform.position;
Vector3 vector = Helper.getCamera().WorldToScreenPoint(position);
if (vector.z >= 0f)
{
vector = new Vector2(vector.x, (float)Screen.height - vector.y);
int num2 = (int)((EspEnable.espDist - num) / EspEnable.espDist * 16f);
if (num2 == 0)
{
num2 = 1;
}
GUI.skin.label.fontSize = num2;
Vector2 vector2 = GUI.skin.label.CalcSize(new GUIContent(text2));
GUI.color = Color.green;
GUI.Label(new Rect(vector.x - vector2.x / 2f, vector.y, vector2.x, vector2.y), text2);
}
}
}
catch (System.Exception ex)
{
string message = ex.Message;
}
IL_1F3:
i++;
continue;
goto IL_1F3;
}
}
}
private void updateespitem()
{
if (this.espskip > 150 || this.objects == null)
{
this.objects = (UnityEngine.Object.FindObjectsOfType(this.type.Ge tType()) as MonoBehaviour[]);
this.espskip = 0;
}
this.espskip++;
}
}

public class EspEnable
{
public static Rect EspWindow = new Rect(0f, 0f, 190f, 400f);
public static float espDist = 300f;
public static void drawESP(int id)
{
float num = 0f;
Hacks.esp = GUI.Toggle(new Rect(10f, num += 25f, 130f, 20f), Hacks.esp, "Esp On/Off");
if (Hacks.esp)
{
GUI.skin.label.fontSize = 12;
GUI.Label(new Rect(0f, num += 25f, 120f, 20f), "Esp Range:" + (int)EspEnable.espDist + "M");
EspEnable.espDist = GUI.HorizontalSlider(new Rect(10f, num += 25f, 100f, 30f), EspEnable.espDist, 100f, 5000f);
Hacks.playeresp.enabled = GUI.Toggle(new Rect(10f, num += 25f, 120f, 20f), Hacks.playeresp.enabled, "Player Esp");
Hacks.zombieesp.enabled = GUI.Toggle(new Rect(10f, num += 25f, 120f, 20f), Hacks.zombieesp.enabled, "Zombie Esp");
Hacks.trapesp.enabled = GUI.Toggle(new Rect(10f, num += 25f, 120f, 20f), Hacks.trapesp.enabled, "Trap Esp");
Hacks.itemesp.enabled = GUI.Toggle(new Rect(10f, num += 25f, 120f, 20f), Hacks.itemesp.enabled, "Item Esp");
Hacks.crateesp.enabled = GUI.Toggle(new Rect(10f, num += 25f, 120f, 20f), Hacks.crateesp.enabled, "Crate Esp");
Hacks.lockedCrateesp.enabled = GUI.Toggle(new Rect(10f, num += 25f, 120f, 20f), Hacks.lockedCrateesp.enabled, "LockedCrate Esp");
Hacks.vehicleesp.enabled = GUI.Toggle(new Rect(10f, num += 25f, 120f, 20f), Hacks.vehicleesp.enabled, "Vehicle Esp");
Hacks.animalesp.enabled = GUI.Toggle(new Rect(10f, num + 25f, 120f, 20f), Hacks.animalesp.enabled, "Animal Esp");
}
GUI.DragWindow();
}
}

internal static class Helper
{
public static float scrHeight = (float)Screen.height;
public static float scrWidth = (float)Screen.width;
private static Camera mainCamera = null;
private static long cameraTime = 0L;
private static Player[] players = null;
private static long playersTime = 0L;
private static Player me = null;
private static long meTime = 0L;
private static CharacterController characterController = null;
private static long characterControllerTime = 0L;
public static Camera getCamera()
{
if (Helper.getTimeStamp() - Helper.cameraTime > 1L || Helper.mainCamera == null)
{
Helper.mainCamera = Camera.main;
Helper.scrHeight = (float)Screen.height;
Helper.scrWidth = (float)Screen.width;
Helper.cameraTime = Helper.getTimeStamp();
}
return Helper.mainCamera;
}
public static Player[] getPlayers()
{
if (Helper.getTimeStamp() - Helper.playersTime > 1L || Helper.players == null)
{
Helper.players = UnityEngine.Object.FindObjectsOfType<Player>();
Helper.playersTime = Helper.getTimeStamp();
}
return Helper.players;
}
public static Player getMe()
{
if (Helper.getTimeStamp() - Helper.meTime > 1L || Helper.me == null)
{
Player[] array = UnityEngine.Object.FindObjectsOfType<Player>();
for (int i = 0; i < array.Length; i++)
{
Player player = array;
if (player.networkView.isMine)
{
Helper.me = player;
}
}
Helper.meTime = Helper.getTimeStamp();
}
return Helper.me;
}
public static CharacterController getCharacterController()
{
if (Helper.getTimeStamp() - Helper.characterControllerTime > 1L || Helper.characterController == null)
{
Helper.characterController = UnityEngine.Object.FindObjectOfType<CharacterContr oller>();
Helper.characterControllerTime = Helper.getTimeStamp();
}
return Helper.characterController;
}
public static long getTimeStamp()
{
System.DateTime dateTime = new System.DateTime(1970, 1, 1);
return (System.DateTime.UtcNow.Ticks - dateTime.Ticks) / 10000000L;
}
}


You have here my source code (find on internet) can you think it(s work ? or i need to make a new ?

Thanks so much for you'r help
The source code looks incomplete so you'd have to mess around with it to get it to work but it looks like a good start. If it still works(it should) you should use Kunii's unityhook and payload to use that source code.
Quote Originally Posted by Kr4ken View Post
The source code looks incomplete so you'd have to mess around with it to get it to work but it looks like a good start. If it still works(it should) you should use Kunii's unityhook and payload to use that source code.
Unityhooks no longer work since the latest update
1 week has passed and no further replies have been made by the OP. Assuming solved.

/Closed.
Posts 1–8 of 8 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Talk with us