FREE TOOL · StatGetInt / StatSetInt
FiveM player stats
10,398 GTA 5 stat names, each with the type it is declared as — because the type is what decides whether you call StatGetInt, StatGetFloat, StatGetBool or one of the masked natives, and getting that wrong returns nonsense rather than an error. 9,719 of them are per-character stats that only resolve with an MP0_ or MP1_ prefix. Search, filter by type, flip the character slot, and copy a call that runs.
Names, types and comments come from the published GTA V stat-name dump, which includes a block of the game’s own stat declarations quoted verbatim. We have not renamed, retyped or invented a single row; where a type has no matching native — the 64-bit ones do not have one — the page says so instead of guessing. The group labels are ours, derived from the name prefixes so that 10,398 rows can be narrowed.
Showing 24 to start — search, or filter, for the rest of the 10,398
- intper charStamina
- intper charStrength
- intper charShooting modifier
- intper charStealth modifier
- intper charFlying modifier
- intper charLung capacity modifier
- intper charBike skill modifier
- shortper charMP Char 0 - XP Value
- shortper charMP Char 0 - XP Value
- intper charMP Char 0 - Players current health
- shortPlayers Globals XP
- u64per charTotal Playing time in milliseconds.
- u64per charTotal time driving a car
- u64per charTotal time driving a swimming
- intper charNumber of times mp char 0 died
- intper charNumber of players killed
- intper charNumber of stealth kills
- intper charNumber of fires extinguished
- labelper charCurrent Mission name
- packedper charCharacter Stat with Packed booleans index 0. Takes up to 64 booleans.
- packedper charCharacter Stat with Packed integers index 0. Takes up to 8 integers.
- intper charMP Char 0 - Weapons unlocked bitset
- intper charStat increase - Stamina
- intper charNumber of times cheated
HOW TO USE IT
Five steps, and the fourth is the one that bites
Reading a stat is two lines. The reasons a correct-looking stat script does the wrong thing are all in the details around those two lines.
- 01 Hash the name, do not pass the string
Every stat native takes a Hash, not text. GetHashKey('MP0_STAMINA') is the whole step. Passing the string itself fails quietly and returns zero, which looks exactly like a stat that is genuinely zero.
- 02 Add the character prefix for multiplayer stats
A multiplayer stat is stored per character slot. STAMINA does not resolve; MP0_STAMINA is the first character and MP1_STAMINA the second. Read the slot the player is on rather than hardcoding 0, or your script writes to the wrong character for anybody using their second one.
- 03 Take both return values from a getter
StatGetInt, StatGetFloat and StatGetBool all have an out-parameter in their C signature, and FiveM’s Lua binding returns it after the success flag. local ok, value = StatGetInt(hash, -1). The second argument is documented as always being -1.
- 04 Pass true as the save flag
The last argument of StatSetInt, StatSetFloat and StatSetBool decides whether the value is persisted. false writes to memory only, which survives until the player reconnects — the most common reason a stat "does not stick".
- 05 Check the type before you pick the native
The type column here is what decides the native. A float stat read with StatGetInt returns nonsense rather than an error, and a packed slot written with StatSetInt destroys the 63 other values stored alongside it.
Client side. The second argument is documented as always being -1.
-- MP0_STAMINA — declared int in the dump
-- FiveM's Lua bindings turn a native's pointer out-parameter into an extra
-- return value, so the getter hands back TWO things: whether the read
-- succeeded, then the value. A snippet doing local v = StatGetInt(...) with
-- one variable is reading the success flag, not the number.
local name = 'MP0_STAMINA'
local ok, value = StatGetInt(GetHashKey(name), -1)
if ok then
print(name, value)
else
print(name, 'could not be read — the stat may not exist in this build')
endClient side. The third argument is the save flag — the difference between a value that persists and one that vanishes on reconnect.
-- Write MP0_STAMINA and actually keep it.
-- The third argument of StatSetInt is the save flag. Pass false and the value
-- lives in memory only: it is correct until the player reconnects and then it
-- is gone, with nothing in the console to tell you why.
local name = 'MP0_STAMINA'
StatSetInt(GetHashKey(name), 100, true)MP0_ AND MP1_
Why the name in the list does not work on its own
Two character slots, one stat table. Almost every online stat exists once per slot, and the list stores the bare name.
- The prefix is the character slot
GTA Online gives a player two multiplayer characters. The stats that belong to a character are stored once per slot, so the resolvable name is
MP0_STAMINAfor the first andMP1_STAMINAfor the second. The bareSTAMINAdoes not resolve, and the natives do not complain — you get a hash that matches nothing, a read of zero and a write that goes nowhere.9,719 of the 10,398 rows here are per-character. The list marks each one, and the slot buttons above rewrite every copied line.
- Hardcoding MP0_ is a real bug
It works for every player on their first character and silently reads the wrong person’s numbers for anyone on their second. There is no native that returns “the current slot”; the usual route is the game’s own
MPPLY_LAST_MP_CHAR, which the dump describes as storing the last character the player went into MP as. - MPPLY_ stats are not per-character
The
MPPLY_block — 567 rows — belongs to the account rather than to a character, so those names take no prefix at all. Adding one breaks them exactly the way leaving one off breaks the others.
Client side. Clamped to 0 or 1, because a stat is a number and a number can be anything.
-- The same stat, for whichever character the player is on.
-- A multiplayer stat name on its own does not resolve; it needs the slot
-- prefix. There is no native that returns "the current slot", so the usual
-- route is the stat the game keeps for it: MPPLY_LAST_MP_CHAR, which the dump
-- describes as storing the last character the player went into MP as. Treat
-- it as a good proxy rather than a guarantee, and clamp it.
local function mpStat(bare)
local slot = 0
local ok, current = StatGetInt(GetHashKey('MPPLY_LAST_MP_CHAR'), -1)
if ok and current == 1 then
slot = 1
end
return ('MP%d_%s'):format(slot, bare)
end
local ok, value = StatGetInt(GetHashKey(mpStat('STAMINA')), -1)
print(value)SAVING
Why a stat you definitely wrote is gone tomorrow
The setters take a save flag, and false is a perfectly reasonable-looking value to pass. It is also the single most common reason stats do not stick.
- The flag, not the native
STAT_SET_INT is
(Hash statName, int value, BOOL save). Withsavefalse, the value goes into the in-memory stat block: every getter reads it back, the HUD updates, nothing warns you, and it is gone the moment the player reconnects. Passtrue. - Saving is asynchronous
STAT_SAVE_PENDING exists precisely because the write does not finish on the frame you asked for it. If you need to know a value landed before doing something else, that is the check.
- Something can switch saving off entirely
STAT_SET_BLOCK_SAVES is a global toggle. Another resource or an anti-cheat holding it on makes every correct write disappear with no error anywhere. Worth ruling out before you rewrite your own code twice.
- StatSave itself is undocumented
STAT_SAVE is published as
(int p0, BOOL p1, int p2)with a note that a fourth parameter was added later, and not one of its parameters has a name or a description. Any specific set of numbers you find in a snippet is community practice. We are not going to pretend otherwise: use the save flag on the setter, which is documented, and treat StatSave as a last resort.
Client side. The commented line is there because it is worth knowing about, not because you should call it blindly.
-- Forcing a save, and the honest state of StatSave.
-- StatSetInt's own save flag is the normal way to persist a stat, and it is
-- the one to use. StatSave exists as well, but the published signature names
-- none of its parameters — int p0, BOOL p1, int p2, with the native reference
-- noting a fourth was added later. Any specific set of numbers you see in a
-- snippet is community practice, not documentation.
StatSetInt(GetHashKey('MP0_STAMINA'), 100, true)
-- A save is asynchronous. This is how you find out it finished.
if StatSavePending() then
print('still writing')
end
-- And this is what silently eats writes on some servers: something, often an
-- anti-cheat or another resource, has blocked saving entirely.
-- StatSetBlockSaves(false)TYPES AND NATIVES
Which native each declared type calls for
The type in every row above comes from the dump. This is what it means for your call — including the three places where the published native list has no answer.
- int6,039 stats
A plain 32-bit integer. The bulk of the list.
StatGetInt/StatSetInt - short82 stats
An integer the save stores in 16 bits.
StatGetInt/StatSetIntThe natives are still the int pair — there is no 16-bit getter. Values outside -32,768 to 32,767 are not safe to assume.
- u3296 stats
An unsigned 32-bit integer.
StatGetInt/StatSetIntStatGetInt hands back a signed int, so anything above 2,147,483,647 comes back negative. That is the native, not a bug in the stat.
- u64433 stats
A 64-bit counter. Most of the TIME_ and TOTAL_PLAYING_TIME stats are these, in milliseconds.
StatGetInt/StatSetIntThe published native list has no 64-bit stat getter or setter. For the time stats the reference does give StatGetNumberOfSeconds, Minutes, Hours and Days, which is the honest way to read them; what a plain StatSetInt does to the high half is not documented.
- s6427 stats
A signed 64-bit counter.
StatGetInt/StatSetIntSame caveat as u64: no 64-bit native exists in the published list.
- long7 stats
A 64-bit value.
StatGetInt/StatSetIntSame caveat as u64.
- x641 stats
A 64-bit value the dump does not describe further.
StatGetInt/StatSetIntSame caveat as u64, and the dump gives no meaning for the type name itself.
- float180 stats
A float.
StatGetFloat/StatSetFloat - double5 stats
Declared double in the dump.
StatGetFloat/StatSetFloatThe natives are the float pair; there is no double native. Five stats carry this type.
- bool438 stats
A single boolean.
StatGetBool/StatSetBool - string55 stats
A short text value.
StatGetString/StatSetString - label3 stats
A GXT text label rather than free text.
StatGetString/StatSetGxtLabelIt holds the name of a text entry, so it only renders if that label exists. Writing arbitrary text into it gives you a blank on screen.
- userid2 stats
A platform user id.
StatGetUserId/StatSetUserId - pos38 stats
A stored position — three floats.
StatGetPos/StatSetPos - date50 stats
A packed date.
StatGetDate/StatSetDateStatSetDate takes a pointer to a field array and a field count; none of its parameters are named in the published signature, so building one by hand is guesswork. StatSetCurrentPosixTime is the documented way to stamp "now".
- packed2,942 stats
A slot that holds many values inside one stat: 64 booleans, or 8 integers.
StatGetBoolMasked/StatSetBoolMaskedYou never read the slot itself. The bool slots go through StatGetBoolMasked / StatSetBoolMasked with the index as the mask; the integer slots through StatGetMaskedInt / StatSetMaskedInt. Writing the slot with StatSetInt destroys every other value packed into it.
Client side. The index is the mask. Writing the slot with StatSetInt instead replaces every value packed into it.
-- MP0_PSTAT_BOOL0 is a PACKED slot: one stat holding 64 booleans.
-- Never touch it with StatSetInt. The index inside the slot is the mask
-- argument, and the natives below read and write a single bit of it; writing
-- the whole slot as an int wipes the other 63 values.
local name = 'MP0_PSTAT_BOOL0'
local index = 0 -- which boolean inside the slot
local value = StatGetBoolMasked(GetHashKey(name), index, -1)
StatSetBoolMasked(GetHashKey(name), true, index, true)OUR GROUPING
13 buckets, so 10,398 rows are usable
These labels are ours, derived from the name prefixes. The dump has no category column, so this is a filter rather than a fact about the game — but it is the difference between a searchable list and a wall.
- Skills 16
Stamina, strength, shooting, stealth, flying, lung capacity — the stat bars.
- FLYING_ABILITY
- LUNG_CAPACITY
- PLAYER_MENTAL_STATE
- SCRIPT_INCREASE_DRIV
- SCRIPT_INCREASE_FLY
- SCRIPT_INCREASE_LUNG
- SCRIPT_INCREASE_MECH
- SCRIPT_INCREASE_SHO
- SCRIPT_INCREASE_STAM
- SCRIPT_INCREASE_STL
- Character 889
Head blend, hair, clothing, tattoos and the saved appearance slots.
- CHAR_ABILITY_1_UNLCK
- CHAR_ABILITY_2_UNLCK
- CHAR_ABILITY_3_UNLCK
- CHAR_ACH45_TRACKER
- CHAR_APPEARANCE_CAP_INST
- CHAR_APPEARANCE_CAP_TIME
- CHAR_APPEARANCE_COOLDOWN
- CHAR_CARMODWHCOL_VIEWED_0
- CHAR_CARMODWHCOL_VIEWED_1
- CHAR_CARMODWHEELS_VIEWED_0
- Money 117
Where the character has spent and earned, broken down by category.
- BANK_BALANCE
- CASH_EVC_CORRECTION
- CASH_FIX_EVC_CORRECTION
- CASH_FIX_PVC_WB_CORRECTION
- CASH_GIFT
- CASH_GIFT_CREDITED
- CASH_GIFT_DEBITED
- CASH_GIFT_LABEL
- CASH_GIFT_LABEL_1
- CASH_GIFT_LABEL_2
- Gameplay counters 354
Kills, deaths, distances, time spent doing things.
- ADVRIFLE_DEATHS
- ADVRIFLE_ENEMY_KILLS
- ADVRIFLE_KILLS
- AIRSTRIKE_DEATHS
- AIRSTRIKE_ENEMY_KILLS
- AIRSTRIKE_KILLS
- AMMO_PURCHASED_HEAVY
- AMMO_PURCHASED_PISTOLS
- AMMO_PURCHASED_RIFLES
- AMMO_PURCHASED_SHOTGUNS
- Damage 169
The per-weapon damage and hit bookkeeping.
- DAMAGE_SCAR_AGE_0
- DAMAGE_SCAR_AGE_1
- DAMAGE_SCAR_AGE_10
- DAMAGE_SCAR_AGE_11
- DAMAGE_SCAR_AGE_12
- DAMAGE_SCAR_AGE_13
- DAMAGE_SCAR_AGE_14
- DAMAGE_SCAR_AGE_15
- DAMAGE_SCAR_AGE_16
- DAMAGE_SCAR_AGE_17
- Awards 188
The AWD_ award and medal progress stats.
- AWD_100_HEADSHOTS
- AWD_100_KILLS_PISTOL
- AWD_100_KILLS_SHOTGUN
- AWD_100_KILLS_SMG
- AWD_100_KILLS_SNIPER
- AWD_20_KILLS_MELEE
- AWD_25_KILLS_STICKYBOMBS
- AWD_50_KILLS_GRENADES
- AWD_50_KILLS_ROCKETLAUNCH
- AWD_50_VEHICLES_BLOWNUP
- Freemode 239
Rank, XP, missions, contacts and the shared freemode bookkeeping.
- CONTACT_MISS_0
- CONTACT_MISS_1
- CONTACT_MISS_2
- CONTACT_MISS_3
- CONTACT_MISS_4
- CONTACT_MISS_5
- CONTACT_MISS_6
- CONTACT_MISS_7
- CONTACT_MISS_8
- CONTACT_MISS_9
- DLC and businesses 3,717
One block per update — bikers, arena, casino, heists, nightclubs and the rest.
- APAPSTAT_INT0
- APAPSTAT_INT1
- APAPSTAT_INT10
- APAPSTAT_INT100
- APAPSTAT_INT101
- APAPSTAT_INT102
- APAPSTAT_INT103
- APAPSTAT_INT104
- APAPSTAT_INT105
- APAPSTAT_INT106
- Saved vehicles 2,083
The MPSV_ garage slots: one block of stats per stored vehicle.
- MPSV_FLAGS_0
- MPSV_FLAGS_1
- MPSV_FLAGS_10
- MPSV_FLAGS_100
- MPSV_FLAGS_101
- MPSV_FLAGS_102
- MPSV_FLAGS_103
- MPSV_FLAGS_104
- MPSV_FLAGS_105
- MPSV_FLAGS_106
- Profile 567
MPPLY_ stats, which belong to the account rather than to a character.
- MPPLY_ACTIVITY_ENDED
- MPPLY_ACTIVITY_QUIT
- MPPLY_ACTIVITY_STARTED
- MPPLY_ARMWRESTLING_TOTAL_MATCH
- MPPLY_ARMWRESTLING_TOTAL_WINS
- MPPLY_AUTOMUTE_MESSAGE
- MPPLY_AVAILABLE_CTF
- MPPLY_AVAILABLE_CTF_V
- MPPLY_AVAILABLE_DMS
- MPPLY_AVAILABLE_DMS_V
- Packed 24
The PSTAT slots that hold 64 booleans or 8 integers inside one stat.
- MP_PSTAT_BOOL0
- MP_PSTAT_BOOL1
- MP_PSTAT_BOOL2
- MP_PSTAT_INT0
- MP_PSTAT_INT1
- MP_PSTAT_INT2
- PSTAT_BOOL0
- PSTAT_BOOL1
- PSTAT_BOOL2
- PSTAT_INT0
- Admin 129
The ADMIN_ stats the game uses for moderation bookkeeping.
- ADMIN_APARTM_GV_BS_1
- ADMIN_APARTM_GV_BS_2
- ADMIN_APARTM_GV_BS_3
- ADMIN_APARTM_POSIX
- ADMIN_APARTM_RM_BS_1
- ADMIN_APARTM_RM_BS_2
- ADMIN_APARTM_RM_BS_3
- ADMIN_APARTM_SLOT
- ADMIN_CLOTHES_GV_BS_1
- ADMIN_CLOTHES_GV_BS_10
- Everything else 1,906
Rows our prefix rule does not place; the names and types are still the dump’s.
- ACCOUNTANTSHIRTUNLOCK
- ACTION_FIG_COLLECTED
- ADVERSARY_PROMO_HELP1
- ADVERSARY_PROMO_HELP2
- ADVERSARY_PROMO_HELP3
- ADVERSARYMISSION_CR
- ADVRIFLE_AQUIRED_AS_GIFT
- ADVRIFLE_FM_AMMO_BOUGHT
- ADVRIFLE_FM_AMMO_CURRENT
- ADVRIFLE_HEADSHOTS
THE ONES PEOPLE ASK FOR
Skills, rank, armour and the timers
All per-character unless marked otherwise, so each of these needs its MP0_ or MP1_ prefix. The types are the dump's, not ours.
| Stat | Type | Prefix | What the dump says |
|---|---|---|---|
| STAMINA | int | MP0_ / MP1_ | Stamina |
| STRENGTH | int | MP0_ / MP1_ | Strength |
| SHOOTING_ABILITY | int | MP0_ / MP1_ | Shooting modifier |
| STEALTH_ABILITY | int | MP0_ / MP1_ | Stealth modifier |
| FLYING_ABILITY | int | MP0_ / MP1_ | Flying modifier |
| LUNG_CAPACITY | int | MP0_ / MP1_ | Lung capacity modifier |
| WHEELIE_ABILITY | int | MP0_ / MP1_ | Bike skill modifier |
| CHAR_RANK_FM | short | MP0_ / MP1_ | MP Char 0 - XP Value |
| CHAR_XP_FM | short | MP0_ / MP1_ | MP Char 0 - XP Value |
| CHAR_CURRENT_ARMOUR | int | MP0_ / MP1_ | MP Char 0 - Players current health |
| MPPLY_GLOBALXP | short | none | Players Globals XP |
| TOTAL_PLAYING_TIME | u64 | MP0_ / MP1_ | Total Playing time in milliseconds. |
| TIME_DRIVING_CAR | u64 | MP0_ / MP1_ | Total time driving a car |
| TIME_SWIMMING | u64 | MP0_ / MP1_ | Total time driving a swimming |
| DEATHS | int | MP0_ / MP1_ | Number of times mp char 0 died |
| KILLS_PLAYERS | int | MP0_ / MP1_ | Number of players killed |
| KILLS_STEALTH | int | MP0_ / MP1_ | Number of stealth kills |
| FIRES_EXTINGUISHED | int | MP0_ / MP1_ | Number of fires extinguished |
| MISSION_NAME | label | MP0_ / MP1_ | Current Mission name |
| PSTAT_BOOL0 | packed | MP0_ / MP1_ | Character Stat with Packed booleans index 0. Takes up to 64 booleans. |
| PSTAT_INT0 | packed | MP0_ / MP1_ | Character Stat with Packed integers index 0. Takes up to 8 integers. |
| CHAR_FM_WEAP_UNLOCKED | int | MP0_ / MP1_ | MP Char 0 - Weapons unlocked bitset |
| SCRIPT_INCREASE_STAM | int | MP0_ / MP1_ | Stat increase - Stamina |
| TIMES_CHEATED | int | MP0_ / MP1_ | Number of times cheated |
QUESTIONS
About GTA 5 player stats in FiveM
What do the MP0_ and MP1_ prefixes mean?
Why does my stat reset when the player reconnects?
Which native matches which stat type?
What is a packed stat and why can I not just set it?
Can I invent a stat name of my own?
Is this list complete?
Every control index with its default key, a press-a-key panel, and an honest answer about the 0 / 1 / 2 argument.
Scaleform referenceThe scaleform movies and their callable functions, with every parameter list marked documented or community-reconstructed.
All the free toolsThe map, the reference lists and every calculator, in one place.