Figuring out the next position.
#1

Uh, maybe the title isn't all that great but what I mean is.. how do I find out what position (x, y and z axis) will the player have.

What I mean is, using math, of course.. once the player presses W, A, S or D, how to detect the next position he will have? I am trying to make players run faster using SetPlayerVelocity, but I do not know how to detect the way the player is going. My math is not all that great.

If anyone has an idea and is willing to share, please post it here.

Thanks in advance.
Reply
#2

Well just use GetPlayerVelocity for the direction he is moving
pawn Код:
new
    Float: vX,
    Float: vY,
    Float: vZ
;
GetPlayerVelocity(playerid, vX, vY, vZ);
SetPlayerVelocity(playerid, vX * 2.0, vY * 2.0, vZ * 2.0);
That will simply double his movement speed each time it is called
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)