Advertisement
djhonga2001

Untitled

May 6th, 2016
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. void microTeleport()
  2. {
  3. Ped playerPed = PLAYER::PLAYER_PED_ID();
  4. static Vector3 curLocation = ENTITY::GET_ENTITY_COORDS(playerPed, 0);
  5. static float curHeading = ENTITY::GET_ENTITY_HEADING(playerPed);
  6.  
  7. float forwardPush = 0.1; //tiny
  8.  
  9. float xVect = forwardPush * sin(degToRad(curHeading)) * -1.0f;
  10. float yVect = forwardPush * cos(degToRad(curHeading));
  11.  
  12. ENTITY::SET_ENTITY_COORDS_NO_OFFSET(playerPed, curLocation.x + xVect, curLocation.y + yVect, curLocation.z, 1, 1, 1);
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement