Velocity by default - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Velocity by default (
/showthread.php?tid=103533)
Velocity by default -
cmg4life - 20.10.2009
Could anyone tell me which are the default values for Velocity ? Like normal Walking (one press of W should give what velocity ) or normal Jumping ( pressing space gives what velocity ) ?
Also how to send velocity in front of player? I tryed with GetXY in front of player and use gX - pX + 0.3, gY - pY to give 0.3 velocity forward, didnt work, he didnt move forward (other direction).
Re: Velocity by default -
V1ceC1ty - 20.10.2009
i was sure it was on wiki but you could use GetPlayerVelocity and find out.
Re: Velocity by default -
cmg4life - 20.10.2009
Yea, but using GetPlayerVelocity while jumping is kinda buggie, i'd like some default values, like some 100% sure ones.
Re: Velocity by default -
V1ceC1ty - 20.10.2009
0.2 = a jump i know that from wiki
Re: Velocity by default -
cmg4life - 20.10.2009
k, thnx
Re: Velocity by default -
Joe Staff - 20.10.2009
mind you, SetPlayerVelocity only works on players that aren't touching the ground.
Re: Velocity by default -
NeRoSiS - 20.10.2009
Quote:
Originally Posted by Joe Staff
mind you, SetPlayerVelocity only works on players that aren't touching the ground.
|
I noticed that too, it just sets the players position aobut 5 in front.
Re: Velocity by default -
cyber_punk - 20.10.2009
Quote:
Originally Posted by Wazza!
Quote:
Originally Posted by Joe Staff
mind you, SetPlayerVelocity only works on players that aren't touching the ground.
|
I noticed that too, it just sets the players position aobut 5 in front.
|
That's when it does move it, most of the time if you try and SetPlayerVelocity when they are on the ground (at least in my tests) you had more of a chance of it taking your health then moving you.
Re: Velocity by default -
NeRoSiS - 20.10.2009
Quote:
Originally Posted by cyber_punk
Quote:
Originally Posted by Wazza!
Quote:
Originally Posted by Joe Staff
mind you, SetPlayerVelocity only works on players that aren't touching the ground.
|
I noticed that too, it just sets the players position aobut 5 in front.
|
That's when it does move it, most of the time if you try and SetPlayerVelocity when they are on the ground (at least in my tests) you had more of a chance of it taking your health then moving you.
|
The way I did it was make the button holdable (Timer) then also set the z +0.1, it works pretty good for me, I also mad it when they release the sprint key it increases the falling velocity so you hit the floor quicker.