03.09.2016, 08:29
Use GetXYInFrontOfPlayer on the player holding the baseball, and then loop to check who's standing in front of them.
After that, use this:
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);