Player flying
#1

Hi,

How to make that?

https://www.youtube.com/watch?v=KO7pHC1q_zE
Reply
#2

You have to detect if the player is hitting the other player.
Then you need some kind of animation for the player and then you can make him flying using SetPlayerVelocity
Reply
#3

What numbers i need to use in setplayervelocity to make that?
Reply
#4

Well there should be something you have to do.
Try to make a command:
PHP код:
CMD:setvel(playerid,params[])
{
new 
Float:x,Float:y,Float:z;
sscanf(params,"fff",x,y,z);
SetPlayerVelocity(playerid,x,y,z);
return 
1;

Then just use the command to find out which value you need.
Reply
#5

Yes, but it always set velocty in what direction in what facing, i want that it changes by front of my, like getxyinfrontofplayer,
Reply
#6

Use GetXYInFrontOfPlayer on the player holding the baseball, and then loop to check who's standing in front of them.
After that, use this:
Код:
new Float: X, Float: Y, Float: A;
GetPlayerFacingAngle(playerid, A);
X = floatsin(-A, degrees);
Y = floatcos(-A, degrees);
SetPlayerVelocity(TARGETID, floatmul(ENTERY_VELOCITY, X), floatmul(ENTER_VELOCITY, Y), ENTER_Z);
Reply
#7

Thanks!!!!

And what animation is in what video?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)