SetPlayerVelocity
#1

Hi,
i have a question regarding SetPlayerVelocity. Could you let a player move to anotherplayer with this new function? So something like
Quote:

new
FloatX,
FloatY,
FloatZ;
GetPlayerPos(playerid, pX, pY, pZ);
SetPlayerVelocity(otherplayer, pX, pY, pZ);

I know this wont work, but is there any other possibility?
Reply
#2

Ehm sorry, i have tried SetPlayerVelocity, but Move the player...
Reply
#3

Quote:
Originally Posted by Seif_
Velocity is the speed, not the position. This isn't like a MovePlayer(playerid, x, y, z) function.
I know, i already said my code above is crap. I would like to know if its possible to make a Player move to another Player, so create a Function like MovePlayer?
Because im thinking if you can set the speed, isnt it possible to set the speed to the point, the other playing is standing?
Reply
#4

It also will only work if the player is off the ground.
Reply
#5

Quote:
Originally Posted by Joe Staff
It also will only work if the player is off the ground.
i mean you can always set it so when the player jumps or w/e ...but like seif said its a speed not a position so...
the only way i can think of is the really really lame way
if your talking about if the first guy is in LS while the second guy is in LV, then the dumb way is to set the position of the first guy like a couple of distances behind him, and then move the player towards him using set player pos, but if you want the way similar to the "moveobject" then sorry, outta luck, maybe in SAMP 3.0 lol
(like i said really lame)
Reply
#6

lol, could always try a man cannon.
Reply
#7

lol SetPlayerWorldBoundaries in the exact area of the second player and he will eventually be floated there, but he'll also be like a mile in the sky and fall to his death 0_o
Reply
#8

The best work-around for this that I see would be to create some simple player object, hide it in a distant virtual world, move it towards player B's coordinates, then set the position of player A according to the coordinates of the object and destroy it upon arrival. Inefficient, yes, but easier than all the math that would be required to do the other things.
Reply
#9

Quote:
Originally Posted by Seif_
Quote:
Originally Posted by Joe Staff
lol SetPlayerWorldBoundaries in the exact area of the second player and he will eventually be floated there, but he'll also be like a mile in the sky and fall to his death 0_o
In this case, you apply SetPlayerVelocity to decrease his Z
Lol, that solves his falling to death problem, another issue is the fact it's going to take a decade and 16 days to clear San Andreas in that drift mode. It randomly changes directions that are relatively aimed at the inside of world boundaries, lol it would be funny to see anyway.


/goto ftw
Reply
#10

I dont want to Move a player about 1 km, its just a few meters, so about 6 units. So the one player is able to see the other player, and the first one is able to let the other player move to him.
But as Seif already said, it wont be possible to set the Pos with SetPlayerVelocity, just the speed. But thanks anyway for your help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)