[Help] How do I increase the player's run/walk speed?

So I’ve been toying with the idea of adding an item that buffs speed. Not quite sure how to do that.

2 Likes

Easiest way is that:

Citizen.CreateThread(function()

SetPedMoveRateOverride(PlayerId(),10.0)
SetRunSprintMultiplierForPlayer(PlayerId(),1.49)

end)
5 Likes

What is the max value of each of this, because when I put bigger numbers it doesn’t make any difference?

2 Likes

1.49 is the maximum.

1 Like

Do you maybe know why player moves with normal speed when his skin is NPC?


    if HasModelLoaded(wendigo) then
      SetPlayerModel(player, wendigo)
    else
      print("Couldn't load skin!")
    end

    playerPed = GetPlayerPed(-1)
    player = PlayerId()

    SetTimecycleModifier("spectator3")
    SetPedMotionBlur(playerPed, true)
    SetPedMovementClipset(playerPed, "move_m@fat@a", true)
    SetPedSuffersCriticalHits(playerPed, false)
    GiveWeaponToPed(playerPed, 0xF9DCBF2D, 1, 0, 1)
    SetWeaponDamageMultiplier(player, 10)
    SetEntityHealth(playerPed, 2000)
    AddArmourToPed(playerPed, 1000)
    SetPedArmour(playerPed, 1000)
    SetPedMoveRateOverride(player,10.0)
    SetRunSprintMultiplierForPlayer(player, 1.49)

Animation style works but speed no. And I refreshed playerPed and player after changing the skin. Any ideas?

Sounds like a FiveM issue but there’s probably way around it. Keep trying.

Okay, I fixed my issue. The problem was SetWeaponDamageMultiplier(player, 10) not a skin.

1 Like

What does SetWeaponDamageMultiplier do?

Well, it’s supposed to multiply damage dealt by a player, but I used it the wrong way I suppose.

Man. I’d love to halve damage done by players due to the low health that players have on FiveM. Might try this.

1 Like

i would like that if the player use the armor he will go slowly i tried to add the code to esxbasicneeds function but it doesnt work

1 Like

Yea, I did little mistake. Try this code:

SetRunSprintMultiplierForPlayer(PlayerId(),1.49) -- dont need to execute every tick
Citizen.CreateThread(function()
    while true do  
    Citizen.Wait(0)  

            SetPedMoveRateOverride(PlayerPedId(),2.0)   -- need to execute every tick
    end
end)

If u want to slow down, decrease numbers.

1 Like

where is that file located?

How to stop the animation ?

How to stop the animation?

Do you know where can i find this codes?

These codes are made with natives given on Fivem website and you can get an example there for everything.

1 Like

Okay Thanks <3

can i do the speed 10?

Where do i add this at

1 Like