Advertisement
djhonga2001

GTAV - Advanced Flying car

Nov 18th, 2016
605
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. //----------------- Flying Car -----------------
  2. //
  3. // Just enable the FlyingCar Bool
  4. //
  5. // Double check the Numerics for IS_CONTROL_PRESSED
  6. //-----------------------------------------------------
  7.  
  8. FlyingCarLoop ()
  9. {
  10. if (IS_PED_IN_ANY_VEHICLE(PLAYER_PED_ID,0))
  11. {
  12. int Vehid = GET_VEHICLE_PED_IS_IN(PLAYER_PED_ID,0)
  13.  
  14. if (IS_CONTROL_PRESSED(2,67) ==true ) //Forward
  15. {
  16. float Speed = GET_ENTITY_SPEED(Vehid) + 0.5
  17. SET_VEHICLE_FORWARD_SPEED(Vehid,Speed)
  18. }
  19.  
  20. if ( (IS_CONTROL_PRESSED(2,196) ==true) && ( ! IS_VEHICLE_ON_ALL_WHEELS(Vehid) ) //Left
  21. {
  22. Vector3 Rot = GET_ENTITY_ROTATION(Vehid,2)
  23. Rot.z = Rot.z + 1.0
  24. newRot Vector3(Rot.x, Rot.y, Rot.z)
  25. SET_ENTITY_ROTATION(Vehid,newRot,2,1)
  26. }
  27.  
  28. if ( (IS_CONTROL_PRESSED(2,197) ==true) && ( ! IS_VEHICLE_ON_ALL_WHEELS(Vehid) ) //Right
  29. {
  30. Vector3 Rot = GET_ENTITY_ROTATION(Vehid,2)
  31. Rot.z = Rot.z - 1.0
  32. newRot Vector3(Rot.x, Rot.y, Rot.z)
  33. SET_ENTITY_ROTATION(Vehid,newRot,2,1)
  34. }
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement