Jump to content

Speed Player


DiGiTal

Recommended Posts

  • Moderators
Posted

That is not ging to work. The GTA engine will adjust the running speed to the default until the ped leaves the ground.

You could try to use a walk animation and speed it up:

https://wiki.multitheftauto.com/wiki/SetPedAnimationSpeed

  • Thanks 1

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

  • Moderators
Posted (edited)
36 minutes ago, DiGiTal said:

 nothing happens

Use resourceRoot, not getRootElement...

or don't even use onResourceStart at all. Just run the line for the animation speed. Because wrong using this event can lead to bugs.

 

Where are you starting the animation? Because it is missing in your code. Without animation you will not notice the difference.

 

 

---------

P.s you might need this instead because it doesn't allow you to go faster than 100% = 1.

https://wiki.multitheftauto.com/wiki/SetPedAnimationProgress

 

 

 

 

 

Edited by IIYAMA

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted
addEventHandler( "onClientRender", root,
    function (  )
     setPedAnimationSpeed (localPlayer,"run_player",0.5)
	      setPedAnimationSpeed (localPlayer,"SPRINT_civi",0.5)

    end
)

@IIYAMA i used this works fine , but it slows the player. and the limit of the animspeed is 1 (1== default)

https://wiki.multitheftauto.com/wiki/SetPedAnimationProgress

tried doesn't work at all

addEventHandler( "onClientRender", root,
    function (  )
    setPedAnimationSpeed (localPlayer,"run_player",1)
	    setPedAnimationSpeed (localPlayer,"SPRINT_civi",1)
		  
		  setPedAnimationProgress ( localPlayer "run_player",1)
		  setPedAnimationProgress ( localPlayer "SPRINT_civi",1)

    end
)

 

oKxg02t.png?width=300&height=300

 

  • Moderators
Posted
4 minutes ago, DiGiTal said:

player. and the limit of the animspeed

Use this instead:

https://wiki.multitheftauto.com/wiki/SetPedAnimationProgress

+ onClientRender

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

  • Moderators
Posted
3 minutes ago, DiGiTal said:

animationProgress just my player no animation but like freezing but keep moving slowly

An animation goes from 0 to 100%. That takes an amount of time. But what if you increase that progress?

 

 

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

  • Moderators
Posted
38 minutes ago, DiGiTal said:

like bugging animation but keep moving ,nothing more speed added

You are putting the animation progress to 100% ever frame...

That is the same as 0% progress.

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

  • Moderators
Posted
4 minutes ago, DiGiTal said:

Why mention the progress of the animation , i think it's useless. i don't understand your idea

You do not understand that you have to go through an animation from 0% to 100% in order to even do the animation in the first place? ?

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...