Advertisement
djhonga2001

GTAV - Magic Carpet ( walk in air )

Nov 18th, 2016
408
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. //----------------- Magic Carpet -----------------
  2. //
  3. //Nothing special Do check IS_CONTROL_PRESSED numbers though
  4. //
  5. //--------------------------------------------------
  6.  
  7. InitiateMagicCarpet()
  8. {
  9. int MagicCarpetObject = CREATE_OBJECT("p_oil_slick_01",--------------------------
  10. FREEZE_ENTITY_POSITION(MagicCarpetObject,1)
  11. SET_ENTITY_VISIBLE(MagicCarpetObject,0)
  12. };
  13.  
  14. MagicCarpetLoop()
  15. {
  16. Vector3 PlayerCoord = GET_ENTITY_COORDS(PLAYER_PED_ID(),1)
  17. float xPlane PlayerCoord.X
  18. float yPlane PlayerCoord.Y
  19.  
  20. float Normal = 1.0225
  21. float Down = 1.6
  22. float Up = 0.4
  23. float Vehicular 2000.0
  24.  
  25. if (IS_PED_IN_ANY_VEHICLE(PLAYER_PED_ID(),0) //in Car
  26. {
  27. zPlane = PlayerCoord.Z - Vehicular
  28. }
  29. elseif (IS_CONTROL_PRESSED(2,36) == true ) //Down
  30. {
  31. zPlane = PlayerCoord.Z - Down
  32. }
  33. elseif (IS_CONTROL_PRESSED(2,26) == true ) //Up
  34. {
  35. zPlane = PlayerCoord.Z - Up
  36. }
  37. else //Normal
  38. {
  39. zPlane = PlayerCoord.Z - Normal
  40. }
  41.  
  42. Vector3 Coord(xPlane, yPlane, zPlane)
  43. SET_ENTITY_COORDS(MagicCarpetObject,1,0,0,1)
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement