Adjusting skills as recently mentioned on official FiveM Twitter?

stats
skill
skills

#1

I tried the search but all the threads I found were made prior to this update. I’m assuming with the new update the problem those threads were complaining about doesn’t exist anymore?

I have almost no experience with LUA other than making some tweaks/customizations to others’ code. Could someone tell me how I’d go about setting all players skills at server start/player login? Basically want to have everyone’s skills maxed at all times, even after they’ve changed their ped model using Mello Trainer.


#2

For example:

StatSetInt('MP0_SHOOTING_ABILITY', 100, true)

The character used is MP0, you can see all stats in common.rpf/data/spstatssetup.xml and mpstatssetup.xml.

— FiveM (@_FiveM) November 11, 2017

#3

I don’t quite understand. Is MP0 a PlayerID of 1? And can I just throw that in a .lua file without any further syntax around it?


#4

So I managed to put this together, thanks to @Vespura’s post in another thread of mine.

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(0)
        StatSetInt('MP0_STAMINA', 100, true)
        StatSetInt('MP0_STRENGTH', 100, true)
        StatSetInt('MP0_LUNG_CAPACITY', 100, true)
        StatSetInt('MP0_WHEELIE_ABILITY', 100, true)
        StatSetInt('MP0_FLYING_ABILITY', 100, true)
        StatSetInt('MP0_SHOOTING_ABILITY', 100, true)
        StatSetInt('MP0_STEALTH_ABILITY', 100, true)
    end
end)

What still confuses me though is how do I set max health and is “WHEELIE_ABILITY” driving skill?


#5

I think, you don’t need to put it in infinite loop. I tried with just calls on time and it have worked


#6

Wheelie ability would be to do with motorbikes,

and to set max health : SetEntityMaxHealth(entity, value)


#7

@KadDarem how would I do that? I have no knowledge of LUA other than making small edits to other peoples’ open source resources.

@koil Thank you.

Edit:
@koil Odd, I didn’t see any “driving_ability” in the file… Also, what would I enter for the “entity” field in max health?


#8

Just figured out the entity on my own from another piece of code someone showed me. Would the below be correct for full health?

SetEntityMaxHealth(PlayerId(), 100)