getCombatFloat
GET_COMBAT_FLOAT0x52DFF8A10508090AThe GTA V native GET_COMBAT_FLOAT of the PED namespace, as LS:MP client scripts call it: the global function getCombatFloat, in JavaScript and in Lua.
getCombatFloat(ped: Ped, p1: number): numbergetCombatFloat(ped: Ped, p1: integer): numberUsage
const value = getCombatFloat(ped, p1);local value = getCombatFloat(ped, p1)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
p1 | int | number | integer |
Returns
float JavaScript number, Lua numberNotes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
p0: Ped Handle
p1: int i | 0 <= i <= 27
p1 probably refers to the attributes configured in combatbehavior.meta. There are 13. Example:
<BlindFireChance value="0.1"/>
<WeaponShootRateModifier value="1.0"/>
<TimeBetweenBurstsInCover value="1.25"/>
<BurstDurationInCover value="2.0"/>
<TimeBetweenPeeks value="10.0"/>
<WeaponAccuracy value="0.18"/>
<FightProficiency value="0.8"/>
<StrafeWhenMovingChance value="1.0"/>
<WalkWhenStrafingChance value="0.0"/>
<AttackWindowDistanceForCover value="55.0"/>
<TimeToInvalidateInjuredTarget value="9.0"/>
<TriggerChargeTime_Near value="4.0"/>
<TriggerChargeTime_Far value="10.0"/>
-------------Confirmed by editing combatbehavior.meta:
p1:
0=BlindFireChance
1=BurstDurationInCover
3=TimeBetweenBurstsInCover
4=TimeBetweenPeeks
5=StrafeWhenMovingChance
8=WalkWhenStrafingChance
11=AttackWindowDistanceForCover
12=TimeToInvalidateInjuredTarget
16=OptimalCoverDistance
Reference
- Namespace
- Ped PED
- In the game
float GET_COMBAT_FLOAT(Ped ped, int p1)- Hash
0x52DFF8A10508090A