Player's values

sky1145960810

New member
Messages
15
Points
1
I'm a novice and my English is not very good. I want to make a plug-in. It needs the function of getting player array,
0: Health
1: Stamina / Charge Capacity
2: Torpidity
3: Oxygen / Charge Regeneration
4: Food
5: Water
6: Temperature
7: Weight
8: MeleeDamageMultiplier / Charge Emission Range
9: SpeedMultiplier
10: TemperatureFortitude
11: CraftingSpeedMultiplier
I want to know how to get these values
Thank you in advance for your help
 
Advertisement

Official Game Server Partner

kalendell

Active member
Plugin Developer
Messages
148
Points
28
C++:
void checkPlayerStats(AShooterPlayerController* aspc) {
    if (aspc && aspc->GetPlayerCharacter()) {
        auto status = aspc->GetPlayerCharacter()->MyCharacterStatusComponentField();
        if (status) {
            auto stats = status->CurrentStatusValuesField()();
            auto maxStats = status->MaxStatusValuesField()();
            Log::GetLog()->info("Health {} / {}", stats[EPrimalCharacterStatusValue::Health], maxStats[EPrimalCharacterStatusValue::Health]);
            Log::GetLog()->info("Stamina {} / {}", stats[EPrimalCharacterStatusValue::Stamina], maxStats[EPrimalCharacterStatusValue::Stamina]);
            // Etc for rest of stats
        }
    }
}

enum Type
{
    Health = 0x0,
    Stamina = 0x1,
    Torpidity = 0x2,
    Oxygen = 0x3,
    Food = 0x4,
    Water = 0x5,
    Temperature = 0x6,
    Weight = 0x7,
    MeleeDamageMultiplier = 0x8,
    SpeedMultiplier = 0x9,
    TemperatureFortitude = 0xA,
    CraftingSpeedMultiplier = 0xB,
    MAX = 0xC,
};
 
Top