Log in to reply
 

Using Native Flags In Custom Class



  • Hi guys,

    Is it possible to make use of GTA's native flags in a new custom class?

    In other words, is there a way for me to use behavior flags, like BF_CanCharge, that are used in combatbehaviour.meta in my own custom C# script?



  • @CapeCon I don't see why not. Check the natives, for example

    float GET_COMBAT_FLOAT(Ped ped, int p1) // 0x52DFF8A10508090A 0x511D7EF8 b323

    p0: Ped Handle
    p1: int i | 0 <= i <= 27

    p1 probably refers to the attributes configured in combatbehavior.meta. There are 13. Example:
    -------------Confirmed by editing combatbehavior.meta:
    p1:
    0=BlindFireChance
    1=BurstDurationInCover
    3=TimeBetweenBurstsInCover
    4=TimeBetweenPeeks
    5=StrafeWhenMovingChance
    8=WalkWhenStrafingChance
    11=AttackWindowDistanceForCover
    12=TimeToInvalidateInjuredTarget
    16=OptimalCoverDistance

    void SET_PED_COMBAT_ATTRIBUTES(Ped ped, int attributeIndex, BOOL enabled) // 0x9F7794730795E019 0x81D64248 b323

    These combat attributes seem to be the same as the BehaviourFlags from combatbehaviour.meta.
    So far, these are the equivalents found:
    enum CombatAttributes
    {
    BF_CanUseCover = 0,
    BF_CanUseVehicles = 1,
    BF_CanDoDrivebys = 2,
    BF_CanLeaveVehicle = 3,
    BF_CanFightArmedPedsWhenNotArmed = 5,
    BF_CanTauntInVehicle = 20,
    BF_AlwaysFight = 46,
    BF_IgnoreTrafficWhenDriving = 52,
    BF_FreezeMovement = 292,
    BF_PlayerCanUseFiringWeapons = 1424
    };

    8 = ?
    9 = ?
    13 = ?
    14 ?

    Research thread: gtaforums.com/topic/833391-researchguide-combat-behaviour-flags/


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.