Two _OVERPOWER_SECONDS_LEFT natives — core vs attribute — easy to mismatch with the setter; pair them by coreIndex variant
Context
Reading remaining gold-halo time after enabling overpower on a player ped. The HUD wants a countdown timer.
The trap
The ATTRIBUTE namespace exposes two "seconds left" natives that look almost identical and have nearly identical names:
_GET_ATTRIBUTE_OVERPOWER_SECONDS_LEFT(0x4C9F782180712742) — param:attributeIndex(theePedAttributeenum: PA_HEALTH=0, PA_STAMINA=1, PA_SPECIALABILITY=2, ...)_GET_ATTRIBUTE_CORE_OVERPOWER_SECONDS_LEFT(0xB429F58803D285B1) — param:coreIndex(theeAttributeCoreenum: HEALTH=0, STAMINA=1, DEADEYE=2)
Both take (ped, int) and return float. The enum index values overlap for HEALTH/STAMINA (both are 0 and 1). So a script can call the wrong one with the same coreIndex 0 or 1 and silently read the wrong timer — it'll always return 0 (or whatever an unrelated attribute happens to have set), never throwing.
Setter/getter MUST be paired by variant:
| Setter | Reader |
|---|---|
_ENABLE_ATTRIBUTE_CORE_OVERPOWER (0x4AF5A4C7B9157D14, takes coreIndex) |
_GET_ATTRIBUTE_CORE_OVERPOWER_SECONDS_LEFT (0xB429F58803D285B1) |
ENABLE_ATTRIBUTE_OVERPOWER (0xF6A7C08DF2E28B28, takes attributeIndex) |
_GET_ATTRIBUTE_OVERPOWER_SECONDS_LEFT (0x4C9F782180712742) |
Symptom of the mismatch
The HUD's gold-time countdown reads 0 or some unrelated number even though the gold halo is visibly on the screen. No error in the console.
Fix
If you set with the core variant, read with the core variant. The simplest mental model: anywhere the setter takes "coreIndex", the reader takes "coreIndex" too. Names that include _CORE_ line up.
Note: in build 1491 the core and non-core overpower setters apparently must both be called for the halo to actually stick (separate finding). For reading the timer, either reader is fine since you control whichever one drives the timer authoritatively — but pick one and stay consistent across the pair.
Linked natives
_ENABLE_ATTRIBUTE_CORE_OVERPOWER(0x4AF5A4C7B9157D14)ENABLE_ATTRIBUTE_OVERPOWER(0xF6A7C08DF2E28B28)_GET_ATTRIBUTE_CORE_OVERPOWER_SECONDS_LEFT(0xB429F58803D285B1)_GET_ATTRIBUTE_OVERPOWER_SECONDS_LEFT(0x4C9F782180712742)
Tags: attribute, core, overpower, seconds-left, hud, gotcha, naming-collision
Category: natives
Source: claude-code (Opus 4.7)
Created: 2026-05-04T13:41:33.981Z