Jump to content

[.NET] Make the player/ped run faster.


Recommended Posts

Hello, can someone tell me how do you make the player run faster i have tried using SET_PED_MOVE_RATE_OVERRIDE, _SET_MOVE_SPEED_MULTIPLIER and SET_PED_DESIRED_MOVE_BLEND_RATIO but none of them perform at least any noticable changes.

I know it is possible because there are lots of mods that do that for example:

http://gtaxscripting.blogspot.pt/2016/04/gta-v-flash-script-mod-nibstyle.html(FLASH SCRIPT MOD)

And in this guy's site you will find more.

OBS: I'm using ScriptHookVDotNet.

Thank you.

Edited by trwygon
Link to comment
https://gtaforums.com/topic/872879-net-make-the-playerped-run-faster/
Share on other sites

The Fast Run mod by yeahhmonkey changes the player's speed like this:

Function.Call(Hash.SET_RUN_SPRINT_MULTIPLIER_FOR_PLAYER, Game.Player.Handle, 1.49f);

Oh and I think the FlashV mod increases speed by applying force to the player.

Edited by Jitnaught

The Fast Run mod by yeahhmonkey changes the player's speed like this:

Function.Call(Hash.SET_RUN_SPRINT_MULTIPLIER_FOR_PLAYER, Game.Player.Handle, 1.49f);

Oh and I think the FlashV mod increases speed by applying force to the player.

Thanks for your answer, can you please provide me an example of how to use apply force to increase players speed?

Edited by trwygon
  • 2 weeks later...
Game.Player.Character.ApplyForceRelative(new Vector3(0f, 5f, 0f), new Vector3(0f, 0f, 0f));//pushes player forward 5 units. put in tick to push continually

Sorry for the late response.

Edited by Jitnaught
  • Like 2
Game.Player.Character.ApplyForceRelative(new Vector3(0f, 5f, 0f), new Vector3(0f, 0f, 0f));//pushes player forward 5 units. put in tick to push continually

Sorry for the late response.

 

no problem, thanks. And sorry for late "thanks" (i guess lol) :D

  • 1 month later...
Game.Player.Character.ApplyForceRelative(new Vector3(0f, 5f, 0f), new Vector3(0f, 0f, 0f));

How exactly would we apply the above to only happen when the character is sprinting and in the direction they are facing?

 

I cannot seem to get the run-sprint multiplier to work, seems force pushing the player forward would work better anyway.

 

I KNOW Julio could help us out

Edited by Pentine
Game.Player.Character.ApplyForceRelative(new Vector3(0f, 5f, 0f), new Vector3(0f, 0f, 0f));

How exactly would we apply the above to only happen when the character is sprinting and in the direction they are facing?

 

I cannot seem to get the run-sprint multiplier to work, seems force pushing the player forward would work better anyway.

 

I KNOW Julio could help us out

 

Try checking if the player is clicking LSHIFT key, most of the people don't change the sprint key. You can also make a mode like super-sprint mode and it would do that.

On the direction you are looking I think that is what it does but I'm not sure i dont remember I'll try it when I can and then i'll update this post.

Anyways if you want to get the forward vector or direction just do:

Vector3 forward_vector = Game.Player.Character.ForwardVector;//And for 5 blocks in front of the player for eg.Vector3 forward_vector5 = Game.Player.Character.ForwardVector * 5;

And then maybe something like this:

Game.Player.Character.ApplyForceRelative(forward_vector5, new Vector3(0f, 0f, 0f));

One thing I noticed is that it kind of makes you fly (when using Game.Player.Character.ApplyForceRelative(new Vector3(0f, 5f, 0f), new Vector3(0f, 0f, 0f));) because if you are going down on a road it doesn't stick to the ground if anyone knows how to fix that please tell me.

  • Like 2

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
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.