is it possible to improve speed while running ?
#1

pawn Код:
new Float:vx,Float:vy,Float:vz;
GetPlayerVelocity(playerid,vx,vy,vz);
SetPlayerVelocity(playerid,vx*1.5,vy*1.5,vz*1.5);
that code work well when i am on air, but when walking it not work.

it is possible to improve speed while running/walking ?
Reply
#2

anyone help ?
Reply
#3

Maybe by detecting the player's PRESSED key as KEY_SPACE or KEY_SPRINT under OnPlayerKeyStateChange. for detecting help browse WIKI .
Reply
#4

Quote:
Originally Posted by Horrible
Посмотреть сообщение
that code work well when i am on air, but when walking it not work.
What do you mean by that? While in plane?
Reply
#5

Quote:
Originally Posted by Mr.Anonymous
Посмотреть сообщение
What do you mean by that? While in plane?
In the air mean that while I am not touch the ground and not ride any vehicle

Ok I will try to do that.

edittill same wont work
Reply
#6

Try setting a run animation when they are pressing 'KEY_SPRINT'.
Reply
#7

Quote:
Originally Posted by zDivine
Посмотреть сообщение
Try setting a run animation when they are pressing 'KEY_SPRINT'.
sry i dont understand please give me a code
Reply
#8

It doesnt work on foot, as the player is "attached" to the ground. It works when he leaves the ground (e.g. jumping) but while running he wont get faster with SetPlayerVelocity, he might just get some damage.
Reply
#9

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
It doesnt work on foot, as the player is "attached" to the ground. It works when he leaves the ground (e.g. jumping) but while running he wont get faster with SetPlayerVelocity, he might just get some damage.
so improve speed while running is impossible ?
Reply
#10

At least in a proper way it is impossible. All you could do is to add a bit of z velocity, so the player is jumping a bit, then you can set the speed with SetPlayerVelocity. But i guess that would look ugly and make controlling hard.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)