Setting player stats with StatSetInt

Hi,

I’m trying to figure out how to set player stats, such as shooting or stamina stat.

What I’ve tried so far is this:

StatSetInt(GetHashKey('STAMINA'), 100, true)
StatSetInt(GetHashKey('MP0_STAMINA'), 100, true)
StatSetInt(GetHashKey('MP1_STAMINA'), 100, true)
StatSetInt(GetHashKey('MP2_STAMINA'), 100, true)
StatSetInt(GetHashKey('MP3_STAMINA'), 100, true)
StatSetInt(GetHashKey('MP4_STAMINA'), 100, true)
StatSetInt(GetHashKey('MP5_STAMINA'), 100, true)
StatSetInt(GetHashKey('MP6_STAMINA'), 100, true)
StatSetInt(GetHashKey('SP0_STAMINA'), 100, true)
StatSetInt(GetHashKey('SP1_STAMINA'), 100, true)
StatSetInt(GetHashKey('SP2_STAMINA'), 100, true)

It doesn’t seem to work, character still runs out of stamina in 2 seconds. It seems to work if I set my character model to for example Michael, but I’d rather have it working for any character (currently have the default fivem-map-skater resource running).

How do I get this to work?

void RESET_PLAYER_STAMINA(Player player) // A6F312FCCE9C1DFE C0445A9C
void RESTORE_PLAYER_STAMINA(Player player, float p1) // A352C1B864CAFD33 62A93608
float GET_PLAYER_SPRINT_STAMINA_REMAINING(Player player) // 3F9F16F8E65A7ED7 47017C90

I think these are more usefull.

I could use something like that, yes, but I’d also like to set strength, shooting, driving etc. stats.

Is there a way to do this?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.