Setting another players velocity
#1

Alright, so basicly I want to make a script that would work something like this: Player A types some command, any player that is infront of him within a certain range (in this case Player B) gets his velocity set to the direction the Player A is facing, already figured out the range but I need some help with getting the Player A angle and then setting Player B's velocity to Player A's facing angle

I'd appreciate any help.
Reply
#2

pawn Код:
new Float:Angle;
GetPlayerFacingAngle(playerid, Angle);
SetPlayerVelocity(Target, Angle, Angle, 0); //Hmm, maybe this? Not sure about it though
Reply
#3

If I'm not wrong that would set it to the amount of angle and not angle
Reply
#4

Quote:
Originally Posted by McCarthy
Посмотреть сообщение
If I'm not wrong that would set it to the amount of angle and not angle
What...?


EDIT: I'm not sure I understand this correctly...Basically, you want to set player B's angle to player A's angle and then do something with velocity?
Reply
#5

If angle would 90 it would set velocity to 90, which is not what I want, I might have explained bad
Reply
#6

You'd have to use some maths.
Reply
#7

Exactly, which I suck at so I need some help D:
Reply
#8

You want to face player B to the direction of player A and speedboost him for him to reach player A?

Don't know how to do first part... might have to use some advanced mathies to guess what angle points to player A because all you have is both's coordinates(where they are facing doesnt matter)...
Reply
#9

Quote:
Originally Posted by henry jiggy
Посмотреть сообщение
You want to face player B to the direction of player A and speedboost him for him to reach player A?
Opposite direction..in theory kinda like fus ro dah if that makes any sense
Reply
#10

Mhhm. Any ideas?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)