Вопрос Как исправить "?`?u?⌂x?UO!☻" в C# ?

Начинающий
Статус
Оффлайн
Регистрация
17 Окт 2023
Сообщения
39
Реакции[?]
4
Поинты[?]
3K
Как в c# исправить русские имена ?
мой код:

main.cs:
using System.Numerics;
using Swed64;
using ClickableTransparentOverlay;
using cs2_external;
using cs2_external.scr;
using ImGuiNET;

namespace CS2_EXTERNAL
{
    class Program : Overlay
    {
        Swed memory = new Swed("cs2"); // connect to cs2

        Entity localPawn = new Entity(); // get entity class
        //List<Entity> entities = new List<Entity>(); // set list for entity;
        Offsets offsets = new Offsets(); // get offsets

        IntPtr client;

        bool self;
        bool health;
        bool origin;
        bool name;

        protected override void Render()
        {
            // [ ImGui ]
            ImGui.Begin("CHEAT | CS2");

            ImGui.Text($"Name -> {localPawn.name}");
        }

        void MainLogic()
        {
            // [ MAIN ]
            client = memory.GetModuleBase("client.dll");

            while (true)
            {
                localPawn.address = memory.ReadPointer(client, offsets.dwLocalPlayerPawn);
                UpdateEntity(localPawn);

                Console.WriteLine($"name -> {localPawn.name}");
            }
        }

        void UpdateEntity(Entity entity)
        {
            entity.health = memory.ReadInt(entity.address, offsets.m_iHealth);
            entity.origin = memory.ReadVec(entity.address, offsets.origin);
            entity.name = memory.ReadString(entity.address, offsets.m_name);
        }

        static void Main(string[] args)
        {
            // starting logic
            Program pm = new Program();
            pm.Start().Wait();
            Thread mainLogic = new Thread(pm.MainLogic) { IsBackground = true };
            mainLogic.Start();
        }
    }
}
Offsets.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace cs2_external.scr
{
    public class Offsets
    {
        // bases
        public int dwLocalPlayerPawn = 0x16BC4A8;
        public int dwEntityList = 0x17B0CF0;

        public int m_iHealth = 0x32C;
        public int origin = 0xCD8;
        public int m_name = 0x18;
    }
}
скрин: x03sE5V.png
 
Сверху Снизу