• Я зарабатываю 100 000 RUB / месяц на этом сайте!

    А знаешь как? Я всего-лишь публикую (создаю темы), а админ мне платит. Трачу деньги на мороженое, робуксы и сервера в Minecraft. А ещё на паль из Китая. 

    Хочешь так же? Пиши и узнавай условия: https://t.me/alex_redact
    Реклама: https://t.me/yougame_official

ESP скилетов без просада FPS For Rust C#

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
9 Фев 2021
Сообщения
91
Реакции
25
C#:
Expand Collapse Copy
 private void OnGUI()
    {
        if (LocalPlayer.Entity != null)
        {
            if (BasePlayer.VisiblePlayerList != null)
            {
                foreach (BasePlayer player in BasePlayer.VisiblePlayerList)
                {
                    if ((player != null) && (player.health > 0f) && !player.IsLocalPlayer())
                    {
                        Vector3 position = player.transform.position;
                        Vector3 vector3 = MainCamera.mainCamera.WorldToScreenPoint(position);

                        GUI.color = Color.white;
                        if (vector3.z > 2f && boneESP && player.IsAlive())
                        {
                            Vector3[] bonePositions = player.GetBonePositions();
                            Vector2[] array = new Vector2[16];
                            for (int i = 0; i < bonePositions.Length; i++)
                            {
                                Vector2 vector4 = MainCamera.mainCamera.WorldToScreenPoint(bonePositions[i]);
                                array[i] = new Vector2(vector4.x, (float)Screen.height - vector4.y);
                            }
                            DrawLine(array[0], array[1], Color.red, 1f, true);
                            DrawLine(array[1], array[2], Color.red, 1f, true);
                            DrawLine(array[2], array[3], Color.red, 1f, true);
                            DrawLine(array[1], array[4], Color.red, 1f, true);
                            DrawLine(array[1], array[7], Color.red, 1f, true);
                            DrawLine(array[4], array[5], Color.red, 1f, true);
                            DrawLine(array[7], array[8], Color.red, 1f, true);
                            DrawLine(array[5], array[6], Color.red, 1f, true);
                            DrawLine(array[8], array[9], Color.red, 1f, true);
                            DrawLine(array[3], array[10], Color.red, 1f, true);
                            DrawLine(array[3], array[13], Color.red, 1f, true);
                            DrawLine(array[10], array[11], Color.red, 1f, true);
                            DrawLine(array[13], array[14], Color.red, 1f, true);
                            DrawLine(array[11], array[12], Color.red, 1f, true);
                            DrawLine(array[14], array[15], Color.red, 1f, true);
                        }
                    }


                }
            }
        }
    }
public static void DrawLine(Vector2 pointA, Vector2 pointB, Color color, float width, bool antiAlias)
    {
        float dx = pointB.x - pointA.x;
        float dy = pointB.y - pointA.y;
        float len = Mathf.Sqrt(dx * dx + dy * dy);
        if (len < 0.001f)
        {
            return;
        }
        Texture2D tex;
        Material mat;
        if (antiAlias)
        {
            width = width * 3.0f;
            tex = aaLineTex;
            mat = blendMaterial;
        }
        else
        {
            tex = lineTex;
            mat = blitMaterial;
        }

        float wdx = width * dy / len;
        float wdy = width * dx / len;
        Matrix4x4 matrix = Matrix4x4.identity;
        matrix.m00 = dx;
        matrix.m01 = -wdx;
        matrix.m03 = pointA.x + 0.5f * wdx;
        matrix.m10 = dy;
        matrix.m11 = wdy;
        matrix.m13 = pointA.y - 0.5f * wdy;
        GL.PushMatrix();
        GL.MultMatrix(matrix);
        GUI.color = color;
        GUI.DrawTexture(lineRect, tex);
        GL.PopMatrix();
    }
    private static Rect lineRect = new Rect(0, 0, 1, 1);
    public static bool boneESP;
C#:
Expand Collapse Copy
public static class Bones
{
    static Bones()
    {
        Bones.boneList[0] = "head";
        Bones.boneList[1] = "neck";
        Bones.boneList[2] = "spine1";
        Bones.boneList[3] = "pelvis";
        Bones.boneList[4] = "l_upperarm";
        Bones.boneList[5] = "l_forearm";
        Bones.boneList[6] = "l_hand";
        Bones.boneList[7] = "r_upperarm";
        Bones.boneList[8] = "r_forearm";
        Bones.boneList[9] = "r_hand";
        Bones.boneList[10] = "l_hip";
        Bones.boneList[11] = "l_knee";
        Bones.boneList[12] = "l_foot";
        Bones.boneList[13] = "r_hip";
        Bones.boneList[14] = "r_knee";
        Bones.boneList[15] = "r_foot";
    }
    public static Vector3[] GetBonePositions(this BasePlayer player)
    {
        Vector3[] array = new Vector3[Bones.boneList.Count];
        for (int i = 0; i < Bones.boneList.Count; i++)
        {
            array[i] = player.playerModel.FindBone(Bones.boneList[i]).position;
        }
        return array;
    }
    public static Dictionary<int, string> boneList = new Dictionary<int, string>();
}
 
Последнее редактирование:
Назад
Сверху Снизу