• Ищем качественного (не новичок) разработчиков Xenforo для этого форума! В идеале, чтобы ты был фулл стек программистом. Если у тебя есть что показать, то свяжись с нами по контактным данным: https://t.me/DREDD

Отображение _health

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
19 Сен 2022
Сообщения
6
Реакции
0
копался в ассемблере сервера игры и нашел такую функцию


C#:
Expand Collapse Copy
public override void Save(global::BaseNetworkable.SaveInfo info)
{
    base.Save(info);
    bool flag = this.net != null && this.net.connection == info.forConnection;
    bool flag2;
    if (!info.forDisk && info.forConnection.player != null)
    {
        global::BasePlayer basePlayer = info.forConnection.player as global::BasePlayer;
        if (basePlayer != null)
        {
            flag2 = basePlayer.IsAdmin;
            goto IL_5E;
        }
    }
    flag2 = false;
    IL_5E:
    bool flag3 = flag2;
    info.msg.basePlayer = Pool.Get<ProtoBuf.BasePlayer>();
    info.msg.basePlayer.userid = this.userID;
    info.msg.basePlayer.name = this.displayName;
    info.msg.basePlayer.playerFlags = (int)this.playerFlags;
    info.msg.basePlayer.currentTeam = this.currentTeam;
    info.msg.basePlayer.heldEntity = this.svActiveItemID;
    info.msg.basePlayer.reputation = this.reputation;
    if (!info.forDisk && this.currentGesture != null && this.currentGesture.animationType == global::GestureConfig.AnimationType.Loop)
    {
        info.msg.basePlayer.loopingGesture = this.currentGesture.gestureId;
    }
    if (this.IsConnected && (this.IsAdmin || this.IsDeveloper))
    {
        info.msg.basePlayer.skinCol = this.net.connection.info.GetFloat("global.skincol", -1f);
        info.msg.basePlayer.skinTex = this.net.connection.info.GetFloat("global.skintex", -1f);
        info.msg.basePlayer.skinMesh = this.net.connection.info.GetFloat("global.skinmesh", -1f);
    }
    else
    {
        info.msg.basePlayer.skinCol = -1f;
        info.msg.basePlayer.skinTex = -1f;
        info.msg.basePlayer.skinMesh = -1f;
    }
    info.msg.basePlayer.underwear = this.GetUnderwearSkin();
    if (info.forDisk || flag)
    {
        info.msg.basePlayer.metabolism = this.metabolism.Save();
        info.msg.basePlayer.modifiers = null;
        if (this.modifiers != null)
        {
            info.msg.basePlayer.modifiers = this.modifiers.Save();
        }
    }
    if (!info.forDisk && !flag)
    {
        info.msg.basePlayer.playerFlags &= -5;
        info.msg.basePlayer.playerFlags &= -129;
        if (info.msg.baseCombat != null && !flag3)
        {
            info.msg.baseCombat.health = 100f;
        }
    }
    info.msg.basePlayer.inventory = this.inventory.Save(info.forDisk || flag);
    this.modelState.sleeping = this.IsSleeping();
    this.modelState.relaxed = this.IsRelaxed();
    this.modelState.crawling = this.IsCrawling();
    this.modelState.loading = this.IsLoadingAfterTransfer();
    info.msg.basePlayer.modelState = this.modelState.Copy();
    if (info.forDisk)
    {
        global::BaseEntity baseEntity = this.mounted.Get(base.isServer);
        if (baseEntity.IsValid())
        {
            if (baseEntity.enableSaving)
            {
                info.msg.basePlayer.mounted = this.mounted.uid;
            }
            else
            {
                global::BaseVehicle mountedVehicle = this.GetMountedVehicle();
                if (mountedVehicle.IsValid() && mountedVehicle.enableSaving)
                {
                    info.msg.basePlayer.mounted = mountedVehicle.net.ID;
                }
            }
        }
        info.msg.basePlayer.respawnId = this.respawnId;
    }
    else
    {
        info.msg.basePlayer.mounted = this.mounted.uid;
    }
    if (flag)
    {
        info.msg.basePlayer.persistantData = this.PersistantPlayerInfo.Copy();
        if (!info.forDisk && this.State.missions != null)
        {
            info.msg.basePlayer.missions = this.State.missions.Copy();
        }
        info.msg.basePlayer.bagCount = global::SleepingBag.GetSleepingBagCount(this.userID);
        info.msg.basePlayer.shelterCount = global::LegacyShelter.GetShelterCount(this.userID);
    }
    if (info.forDisk)
    {
        info.msg.basePlayer.loadingTimeout = this.timeUntilLoadingExpires;
        info.msg.basePlayer.currentLife = this.lifeStory;
        info.msg.basePlayer.previousLife = this.previousLifeStory;
    }
    if (!info.forDisk)
    {
        info.msg.basePlayer.clanId = this.clanId;
    }
    if (info.forDisk)
    {
        info.msg.basePlayer.itemCrafter = this.inventory.crafting.Save();
    }
    if (info.forDisk)
    {
        this.SavePlayerState();
    }
}


и в этой функции я увидел вывод хп игроков "100f"


C#:
Expand Collapse Copy
if (!info.forDisk && !flag)
    {
        info.msg.basePlayer.playerFlags &= -5;
        info.msg.basePlayer.playerFlags &= -129;
        if (info.msg.baseCombat != null && !flag3)
        {
            info.msg.baseCombat.health = 100f;
        }
    }



и так как инфа о состоянии здоровья передаётся только админам(проверка сервера на auth level), можно попробывать передавать серверу auth level 2, или же попробывать найти другой способ, если тут будут такие люди, они поймут как это реализорвать
 
хпшки мертвы
 
копался в ассемблере сервера игры и нашел такую функцию


C#:
Expand Collapse Copy
public override void Save(global::BaseNetworkable.SaveInfo info)
{
    base.Save(info);
    bool flag = this.net != null && this.net.connection == info.forConnection;
    bool flag2;
    if (!info.forDisk && info.forConnection.player != null)
    {
        global::BasePlayer basePlayer = info.forConnection.player as global::BasePlayer;
        if (basePlayer != null)
        {
            flag2 = basePlayer.IsAdmin;
            goto IL_5E;
        }
    }
    flag2 = false;
    IL_5E:
    bool flag3 = flag2;
    info.msg.basePlayer = Pool.Get<ProtoBuf.BasePlayer>();
    info.msg.basePlayer.userid = this.userID;
    info.msg.basePlayer.name = this.displayName;
    info.msg.basePlayer.playerFlags = (int)this.playerFlags;
    info.msg.basePlayer.currentTeam = this.currentTeam;
    info.msg.basePlayer.heldEntity = this.svActiveItemID;
    info.msg.basePlayer.reputation = this.reputation;
    if (!info.forDisk && this.currentGesture != null && this.currentGesture.animationType == global::GestureConfig.AnimationType.Loop)
    {
        info.msg.basePlayer.loopingGesture = this.currentGesture.gestureId;
    }
    if (this.IsConnected && (this.IsAdmin || this.IsDeveloper))
    {
        info.msg.basePlayer.skinCol = this.net.connection.info.GetFloat("global.skincol", -1f);
        info.msg.basePlayer.skinTex = this.net.connection.info.GetFloat("global.skintex", -1f);
        info.msg.basePlayer.skinMesh = this.net.connection.info.GetFloat("global.skinmesh", -1f);
    }
    else
    {
        info.msg.basePlayer.skinCol = -1f;
        info.msg.basePlayer.skinTex = -1f;
        info.msg.basePlayer.skinMesh = -1f;
    }
    info.msg.basePlayer.underwear = this.GetUnderwearSkin();
    if (info.forDisk || flag)
    {
        info.msg.basePlayer.metabolism = this.metabolism.Save();
        info.msg.basePlayer.modifiers = null;
        if (this.modifiers != null)
        {
            info.msg.basePlayer.modifiers = this.modifiers.Save();
        }
    }
    if (!info.forDisk && !flag)
    {
        info.msg.basePlayer.playerFlags &= -5;
        info.msg.basePlayer.playerFlags &= -129;
        if (info.msg.baseCombat != null && !flag3)
        {
            info.msg.baseCombat.health = 100f;
        }
    }
    info.msg.basePlayer.inventory = this.inventory.Save(info.forDisk || flag);
    this.modelState.sleeping = this.IsSleeping();
    this.modelState.relaxed = this.IsRelaxed();
    this.modelState.crawling = this.IsCrawling();
    this.modelState.loading = this.IsLoadingAfterTransfer();
    info.msg.basePlayer.modelState = this.modelState.Copy();
    if (info.forDisk)
    {
        global::BaseEntity baseEntity = this.mounted.Get(base.isServer);
        if (baseEntity.IsValid())
        {
            if (baseEntity.enableSaving)
            {
                info.msg.basePlayer.mounted = this.mounted.uid;
            }
            else
            {
                global::BaseVehicle mountedVehicle = this.GetMountedVehicle();
                if (mountedVehicle.IsValid() && mountedVehicle.enableSaving)
                {
                    info.msg.basePlayer.mounted = mountedVehicle.net.ID;
                }
            }
        }
        info.msg.basePlayer.respawnId = this.respawnId;
    }
    else
    {
        info.msg.basePlayer.mounted = this.mounted.uid;
    }
    if (flag)
    {
        info.msg.basePlayer.persistantData = this.PersistantPlayerInfo.Copy();
        if (!info.forDisk && this.State.missions != null)
        {
            info.msg.basePlayer.missions = this.State.missions.Copy();
        }
        info.msg.basePlayer.bagCount = global::SleepingBag.GetSleepingBagCount(this.userID);
        info.msg.basePlayer.shelterCount = global::LegacyShelter.GetShelterCount(this.userID);
    }
    if (info.forDisk)
    {
        info.msg.basePlayer.loadingTimeout = this.timeUntilLoadingExpires;
        info.msg.basePlayer.currentLife = this.lifeStory;
        info.msg.basePlayer.previousLife = this.previousLifeStory;
    }
    if (!info.forDisk)
    {
        info.msg.basePlayer.clanId = this.clanId;
    }
    if (info.forDisk)
    {
        info.msg.basePlayer.itemCrafter = this.inventory.crafting.Save();
    }
    if (info.forDisk)
    {
        this.SavePlayerState();
    }
}


и в этой функции я увидел вывод хп игроков "100f"


C#:
Expand Collapse Copy
if (!info.forDisk && !flag)
    {
        info.msg.basePlayer.playerFlags &= -5;
        info.msg.basePlayer.playerFlags &= -129;
        if (info.msg.baseCombat != null && !flag3)
        {
            info.msg.baseCombat.health = 100f;
        }
    }



и так как инфа о состоянии здоровья передаётся только админам(проверка сервера на auth level), можно попробывать передавать серверу auth level 2, или же попробывать найти другой способ, если тут будут такие люди, они поймут как это реализорвать
ай мавроди, а яйаяй
1708270678327.png

1708270682558.png
 
тем временем чел который заспавнился с 100 хп :whyRly:
братух игрок спавнится с рандомным значением здоровья от 50 до 60
братух игрок спавнится с рандомным значением здоровья от 50 до 60
return UnityEngine.Random.Range(50f, 60f);
 
братух игрок спавнится с рандомным значением здоровья от 50 до 60

return UnityEngine.Random.Range(50f, 60f);
это понятно, я имею ввиду чел отхилился до 100хп ливнул с игры и зашел, а у него статиком будет от 60 хп высчитываться
 
А если плотный анрег?

А если плотный анрег?
Код:
Expand Collapse Copy
                    if (info->damageTypes()->Total() == 0.00)
                    {
                        LogSystem::Log(StringFormat::format((L"unregistred shot (missed shot due to 0 damage)"), NULL), 5.f);
                    }
                    else
                    {
                        LogSystem::Log(StringFormat::format((L"Hit %s in %s for %.2f damage"), reinterpret_cast<BasePlayer*>(entity)->_displayName(), utils::StringPool::Get(info->HitBone())->buffer, info->damageTypes()->Total()), 5.f);
                    }
 
копался в ассемблере сервера игры и нашел такую функцию


C#:
Expand Collapse Copy
public override void Save(global::BaseNetworkable.SaveInfo info)
{
    base.Save(info);
    bool flag = this.net != null && this.net.connection == info.forConnection;
    bool flag2;
    if (!info.forDisk && info.forConnection.player != null)
    {
        global::BasePlayer basePlayer = info.forConnection.player as global::BasePlayer;
        if (basePlayer != null)
        {
            flag2 = basePlayer.IsAdmin;
            goto IL_5E;
        }
    }
    flag2 = false;
    IL_5E:
    bool flag3 = flag2;
    info.msg.basePlayer = Pool.Get<ProtoBuf.BasePlayer>();
    info.msg.basePlayer.userid = this.userID;
    info.msg.basePlayer.name = this.displayName;
    info.msg.basePlayer.playerFlags = (int)this.playerFlags;
    info.msg.basePlayer.currentTeam = this.currentTeam;
    info.msg.basePlayer.heldEntity = this.svActiveItemID;
    info.msg.basePlayer.reputation = this.reputation;
    if (!info.forDisk && this.currentGesture != null && this.currentGesture.animationType == global::GestureConfig.AnimationType.Loop)
    {
        info.msg.basePlayer.loopingGesture = this.currentGesture.gestureId;
    }
    if (this.IsConnected && (this.IsAdmin || this.IsDeveloper))
    {
        info.msg.basePlayer.skinCol = this.net.connection.info.GetFloat("global.skincol", -1f);
        info.msg.basePlayer.skinTex = this.net.connection.info.GetFloat("global.skintex", -1f);
        info.msg.basePlayer.skinMesh = this.net.connection.info.GetFloat("global.skinmesh", -1f);
    }
    else
    {
        info.msg.basePlayer.skinCol = -1f;
        info.msg.basePlayer.skinTex = -1f;
        info.msg.basePlayer.skinMesh = -1f;
    }
    info.msg.basePlayer.underwear = this.GetUnderwearSkin();
    if (info.forDisk || flag)
    {
        info.msg.basePlayer.metabolism = this.metabolism.Save();
        info.msg.basePlayer.modifiers = null;
        if (this.modifiers != null)
        {
            info.msg.basePlayer.modifiers = this.modifiers.Save();
        }
    }
    if (!info.forDisk && !flag)
    {
        info.msg.basePlayer.playerFlags &= -5;
        info.msg.basePlayer.playerFlags &= -129;
        if (info.msg.baseCombat != null && !flag3)
        {
            info.msg.baseCombat.health = 100f;
        }
    }
    info.msg.basePlayer.inventory = this.inventory.Save(info.forDisk || flag);
    this.modelState.sleeping = this.IsSleeping();
    this.modelState.relaxed = this.IsRelaxed();
    this.modelState.crawling = this.IsCrawling();
    this.modelState.loading = this.IsLoadingAfterTransfer();
    info.msg.basePlayer.modelState = this.modelState.Copy();
    if (info.forDisk)
    {
        global::BaseEntity baseEntity = this.mounted.Get(base.isServer);
        if (baseEntity.IsValid())
        {
            if (baseEntity.enableSaving)
            {
                info.msg.basePlayer.mounted = this.mounted.uid;
            }
            else
            {
                global::BaseVehicle mountedVehicle = this.GetMountedVehicle();
                if (mountedVehicle.IsValid() && mountedVehicle.enableSaving)
                {
                    info.msg.basePlayer.mounted = mountedVehicle.net.ID;
                }
            }
        }
        info.msg.basePlayer.respawnId = this.respawnId;
    }
    else
    {
        info.msg.basePlayer.mounted = this.mounted.uid;
    }
    if (flag)
    {
        info.msg.basePlayer.persistantData = this.PersistantPlayerInfo.Copy();
        if (!info.forDisk && this.State.missions != null)
        {
            info.msg.basePlayer.missions = this.State.missions.Copy();
        }
        info.msg.basePlayer.bagCount = global::SleepingBag.GetSleepingBagCount(this.userID);
        info.msg.basePlayer.shelterCount = global::LegacyShelter.GetShelterCount(this.userID);
    }
    if (info.forDisk)
    {
        info.msg.basePlayer.loadingTimeout = this.timeUntilLoadingExpires;
        info.msg.basePlayer.currentLife = this.lifeStory;
        info.msg.basePlayer.previousLife = this.previousLifeStory;
    }
    if (!info.forDisk)
    {
        info.msg.basePlayer.clanId = this.clanId;
    }
    if (info.forDisk)
    {
        info.msg.basePlayer.itemCrafter = this.inventory.crafting.Save();
    }
    if (info.forDisk)
    {
        this.SavePlayerState();
    }
}


и в этой функции я увидел вывод хп игроков "100f"


C#:
Expand Collapse Copy
if (!info.forDisk && !flag)
    {
        info.msg.basePlayer.playerFlags &= -5;
        info.msg.basePlayer.playerFlags &= -129;
        if (info.msg.baseCombat != null && !flag3)
        {
            info.msg.baseCombat.health = 100f;
        }
    }



и так как инфа о состоянии здоровья передаётся только админам(проверка сервера на auth level), можно попробывать передавать серверу auth level 2, или же попробывать найти другой способ, если тут будут такие люди, они поймут как это реализорвать
нихуя себе ассемблер
 
норм мавроди на 300 руб скамит, хавать нечего чтоли хд

1710092129978.png
время со скольки я жду свой код

1710092177052.png
подождал
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
копался в ассемблере

Код C#:fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearful::fearful::fearful::fearful::coldsweat::coldsweat:
 
Последнее редактирование:
Код C#:fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearscream::fearful::fearful::fearful::fearful::coldsweat::coldsweat:
Owned by shmiga and chozy
Причем тут шмига и чози?
 
Назад
Сверху Снизу