XADRENALINEIX

MaDD x SNiiP3Zz Neon Spawner

May 15th, 2013
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.16 KB | None | 0 0
  1. #include <natives.h>
  2. #include <common.h>
  3. #include <strings.h>
  4. #include <types.h>
  5. #include <consts.h>
  6.  
  7. Vehicle car;
  8. Object neon;
  9.  
  10. void print(char *string)
  11. {
  12. PRINT_STRING_WITH_LITERAL_STRING_NOW("STRING", string, 5000, 1);
  13. }
  14.  
  15. void SpawnLight(float y, float z, float qx, float qy, float qz, float qw)
  16. {
  17. CREATE_OBJECT(0x3BF5F0E5, 0.0f, 0.0f, 0.0f, &neon, 1);
  18. SET_OBJECT_LIGHTS(neon, true);
  19. SET_OBJECT_VISIBLE(neon, true);
  20. SET_OBJECT_INVINCIBLE(neon, 1);
  21. ATTACH_OBJECT_TO_CAR(neon, car, 0, y, z, qx, qy, qz, qw);
  22. }
  23.  
  24. void GreenNeon(void)
  25. {
  26. if(IS_BUTTON_JUST_PRESSED(0,BUTTON_DPAD_UP));
  27. {
  28. if(IS_CHAR_IN_ANY_CHAR(GetPlayerPed()));
  29. {
  30. GET_CAR_CHAR_IS_USING(GetPlayerPed(), &car);
  31. SpawnLight(2474.22,214.307,5.81284,0.613,0.351,-0.613);
  32. SpawnLight(2475.6,210.274,5.01655,0.613,0.351,-0.613);
  33. print("Green Neon: Use Dpad_Up To Spawn");
  34. WAIT(0);
  35. }
  36. else
  37. {
  38. print("You Need To Be Inside A Vehicle To Spawn Neons...");
  39. }
  40. WAIT(0);
  41. }
  42. }
  43.  
  44. void SpawnLight(float y, float z, float qx, float qy, float qz, float qw)
  45. {
  46. CREATE_OBJECT(0x6A299B19, 0.0f, 0.0f, 0.0f, &neon, 1);
  47. SET_OBJECT_LIGHTS(neon, true);
  48. SET_OBJECT_VISIBLE(neon, true);
  49. SET_OBJECT_INVINCIBLE(neon, 1);
  50. ATTACH_OBJECT_TO_CAR(neon, car, 0, y, z, qx, qy, qz, qw);
  51. }
  52.  
  53. void PinkNeon(void)
  54. {
  55. if(IS_BUTTON_JUST_PRESSED(0,BUTTON_DPAD_DOWN));
  56. {
  57. if(IS_CHAR_IN_ANY_CHAR(GetPlayerPed()));
  58. {
  59. GET_CAR_CHAR_IS_USING(GetPlayerPed(), &car);
  60. SpawnLight(2474.22,214.307,5.81284,0.613,0.351,-0.613);
  61. SpawnLight(2475.6,210.274,5.01655,0.613,0.351,-0.613);
  62. print("Pink Neon: Use Dpad_Down To Spawn");
  63. WAIT(0);
  64. }
  65. else
  66. {
  67. print("You Need To Be Inside A Vehicle To Spawn Neons...");
  68. }
  69. WAIT(0);
  70. }
  71. }
  72.  
  73. void SpawnLight(float y, float z, float qx, float qy, float qz, float qw)
  74. {
  75. CREATE_OBJECT(0x9605340C, 0.0f, 0.0f, 0.0f, &neon, 1);
  76. SET_OBJECT_LIGHTS(neon, true);
  77. SET_OBJECT_VISIBLE(neon, true);
  78. SET_OBJECT_INVINCIBLE(neon, 1);
  79. ATTACH_OBJECT_TO_CAR(neon, car, 0, y, z, qx, qy, qz, qw);
  80. }
  81.  
  82. void OrangeNeon(void)
  83. {
  84. if(IS_BUTTON_JUST_PRESSED(0,BUTTON_DPAD_LEFT));
  85. {
  86. if(IS_CHAR_IN_ANY_CHAR(GetPlayerPed()));
  87. {
  88. GET_CAR_CHAR_IS_USING(GetPlayerPed(), &car);
  89. SpawnLight(2474.22,214.307,5.81284,0.613,0.351,-0.613);
  90. SpawnLight(2475.6,210.274,5.01655,0.613,0.351,-0.613);
  91. print("Orange Neon: Use Dpad_Left To Spawn");
  92. WAIT(0);
  93. }
  94. else
  95. {
  96. print("You Need To Be Inside A Vehicle To Spawn Neons...");
  97. }
  98. WAIT(0);
  99. }
  100. }
  101.  
  102. void SpawnLight(float y, float z, float qx, float qy, float qz, float qw)
  103. {
  104. CREATE_OBJECT(0x24443EDD, 0.0f, 0.0f, 0.0f, &neon, 1);
  105. SET_OBJECT_LIGHTS(neon, true);
  106. SET_OBJECT_VISIBLE(neon, true);
  107. SET_OBJECT_INVINCIBLE(neon, 1);
  108. ATTACH_OBJECT_TO_CAR(neon, car, 0, y, z, qx, qy, qz, qw);
  109. }
  110.  
  111. void YellowNeon(void)
  112. {
  113. if(IS_BUTTON_JUST_PRESSED(0,BUTTON_DPAD_RIGHT));
  114. {
  115. if(IS_CHAR_IN_ANY_CHAR(GetPlayerPed()));
  116. {
  117. GET_CAR_CHAR_IS_USING(GetPlayerPed(), &car);
  118. SpawnLight(2474.22,214.307,5.81284,0.613,0.351,-0.613);
  119. SpawnLight(2475.6,210.274,5.01655,0.613,0.351,-0.613);
  120. print("Yellow Neon: Use Dpad_Right To Spawn");
  121. WAIT(0);
  122. }
  123. else
  124. {
  125. print("You Need To Be Inside A Vehicle To Spawn Neons...");
  126. }
  127. WAIT(0);
  128. }
  129. }
  130.  
  131. void Main(void)
  132. {
  133. THIS_SCRIPT_IS_SAFE_FOR_NETWORK_GAME();
  134. while(0);
  135. {
  136. WAIT(0);
  137. }
  138. }
Advertisement
Add Comment
Please, Sign In to add comment