Guest User

Untitled

a guest
Jun 17th, 2015
394
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Car Beam Control [xbox Controller Version][V1.0]
  2. --By Houri.S
  3. local carbeamcontrol = {}
  4.  
  5. function carbeamcontrol.tick()
  6. playerID = PLAYER.PLAYER_ID()
  7. player = PLAYER.GET_PLAYER_PED(playerID)
  8. currentVehicle = PED.GET_VEHICLE_PED_IS_USING(player)
  9.  
  10.  
  11. if(currentVehicle)then
  12. playerID = PLAYER.PLAYER_ID()
  13. player = PLAYER.GET_PLAYER_PED(playerID)
  14. currentVehicle = PED.GET_VEHICLE_PED_IS_USING(player)
  15. CAM.SET_CINEMATIC_BUTTON_ACTIVE(flase)
  16. --VEHICLE.SET_VEHICLE_LIGHTS(currentVehicle, 2)
  17.  
  18.  
  19. if(get_key_pressed(33))then
  20. playerID = PLAYER.PLAYER_ID()
  21. player = PLAYER.GET_PLAYER_PED(playerID)
  22. currentVehicle = PED.GET_VEHICLE_PED_IS_USING(player)
  23. VEHICLE.ROLL_UP_WINDOW(currentVehicle, 0)
  24. VEHICLE.ROLL_UP_WINDOW(currentVehicle, 1)
  25. end
  26.  
  27.  
  28. if(get_key_pressed(34))then
  29. playerID = PLAYER.PLAYER_ID()
  30. player = PLAYER.GET_PLAYER_PED(playerID)
  31. currentVehicle = PED.GET_VEHICLE_PED_IS_USING(player)
  32. VEHICLE.ROLL_DOWN_WINDOW(currentVehicle, 0)
  33. VEHICLE.ROLL_DOWN_WINDOW(currentVehicle, 1)
  34. end
  35.  
  36. if(CONTROLS.IS_CONTROL_PRESSED(2,45))then
  37. playerID = PLAYER.PLAYER_ID()
  38. player = PLAYER.GET_PLAYER_PED(playerID)
  39. currentVehicle = PED.GET_VEHICLE_PED_IS_USING(player)
  40. VEHICLE.SET_VEHICLE_LIGHT_MULTIPLIER(currentVehicle, 2.0)
  41. else
  42. playerID = PLAYER.PLAYER_ID()
  43. player = PLAYER.GET_PLAYER_PED(playerID)
  44. currentVehicle = PED.GET_VEHICLE_PED_IS_USING(player)
  45. VEHICLE.SET_VEHICLE_LIGHT_MULTIPLIER(currentVehicle, 0.75)
  46. end
  47.  
  48. if(CONTROLS.IS_CONTROL_PRESSED(2,18) and CONTROLS.IS_CONTROL_PRESSED(2,45))then
  49. playerID = PLAYER.PLAYER_ID()
  50. player = PLAYER.GET_PLAYER_PED(playerID)
  51. currentVehicle = PED.GET_VEHICLE_PED_IS_USING(player)
  52. VEHICLE.SET_VEHICLE_MOD_KIT(currentVehicle, 0)
  53. VEHICLE.SET_VEHICLE_MOD(currentVehicle, 11, 3, true)
  54. VEHICLE.SET_VEHICLE_MOD(currentVehicle, 12, 2, true)
  55. VEHICLE.SET_VEHICLE_MOD(currentVehicle, 16, 4, true)
  56. VEHICLE.TOGGLE_VEHICLE_MOD(currentVehicle, 22, true)
  57. VEHICLE.TOGGLE_VEHICLE_MOD(currentVehicle, 18, true)
  58. VEHICLE.SET_VEHICLE_MOD(currentVehicle, 13, 2, true)
  59. VEHICLE.SET_VEHICLE_MOD(currentVehicle, 15, 3, true)
  60. VEHICLE.SET_VEHICLE_WINDOW_TINT(currentVehicle, 1)
  61. VEHICLE.SET_VEHICLE_DIRT_LEVEL(currentVehicle, 0)
  62. VEHICLE.SET_VEHICLE_FIXED(currentVehicle)
  63. VEHICLE.SET_VEHICLE_NUMBER_PLATE_TEXT_INDEX(currentVehicle,1)
  64. VEHICLE.SET_VEHICLE_NUMBER_PLATE_TEXT(currentVehicle,"2SW33T4U")
  65. --VEHICLE.SET_VEHICLE_COLOURS(currentVehicle,12,12)
  66. --VEHICLE._SET_VEHICLE_NEON_LIGHTS_COLOUR(currentVehicle,0,0,255)
  67. --VEHICLE._SET_VEHICLE_NEON_LIGHT_ENABLED(currentVehicle,0,true)
  68. --VEHICLE._SET_VEHICLE_NEON_LIGHT_ENABLED(currentVehicle,1,true)
  69. --VEHICLE._SET_VEHICLE_NEON_LIGHT_ENABLED(currentVehicle,2,true)
  70. --VEHICLE._SET_VEHICLE_NEON_LIGHT_ENABLED(currentVehicle,3,true)
  71. end
  72.  
  73. if(CONTROLS.IS_CONTROL_PRESSED(2,10) or CONTROLS.IS_CONTROL_PRESSED(2,44))then
  74. playerID = PLAYER.PLAYER_ID()
  75. player = PLAYER.GET_PLAYER_PED(playerID)
  76. currentVehicle = PED.GET_VEHICLE_PED_IS_USING(player)
  77. VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(currentVehicle,0,true)
  78. VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(currentVehicle,1,true)
  79. else
  80. playerID = PLAYER.PLAYER_ID()
  81. player = PLAYER.GET_PLAYER_PED(playerID)
  82. currentVehicle = PED.GET_VEHICLE_PED_IS_USING(player)
  83. VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(currentVehicle,0,false)
  84. VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(currentVehicle,1,false)
  85. end
  86. end
  87. end
  88. return carbeamcontrol
RAW Paste Data