Advertisement
Guest User

Fff

a guest
Feb 11th, 2015
325
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.34 KB | None | 0 0
  1. // New Coash
  2. //
  3. //By Golf
  4.  
  5. #include <a_samp>
  6.  
  7.  
  8. new Vvar[48];
  9. new bool:Var,Veh,Timer;
  10.  
  11.  
  12. public OnFilterScriptInit()
  13. {
  14. print("\n New Coash");
  15. Var = false;
  16. return 1;
  17. }
  18.  
  19.  
  20. public OnFilterScriptExit()
  21. {
  22. Var = false;
  23. return 1;
  24. }
  25.  
  26.  
  27. public OnPlayerCommandText(playerid, cmdtext[])
  28. {
  29. if (strcmp("/spawnc", cmdtext, true, 6) == 0)
  30. {
  31. if(Var == true) return true;
  32. obj();
  33. CreateVcoash(playerid);
  34. return 1;
  35. }
  36. if (strcmp("/delete", cmdtext, true, 6) == 0)
  37. {
  38. if(Var == false) return true;
  39. DestroyVcoash(playerid);
  40. return 1;
  41. }
  42. if (strcmp("/enter", cmdtext, true, 6) == 0)
  43. {
  44. new Float:x, Float:y, Float:z;
  45. GetPlayerPos(playerid, x, y, z);
  46. SetPlayerPos(playerid,x, y, z+3);
  47. return 1;
  48. }
  49. if (strcmp("/exit", cmdtext, true, 4) == 0)
  50. {
  51. new Float:x, Float:y, Float:z;
  52. GetPlayerPos(playerid, x, y, z);
  53. SetPlayerPos(playerid,x+1, y+1, z-1);
  54. return 1;
  55. }
  56. if (strcmp("/cam", cmdtext, true, 3) == 0)
  57. {
  58. Timer = SetTimerEx("camupdate", 1, true, "i", playerid);
  59.  
  60. return 1;
  61. }
  62. if (strcmp("/exitcam", cmdtext, true, 7) == 0)
  63. {
  64. SetCameraBehindPlayer(playerid);
  65. KillTimer(Timer);
  66. return 1;
  67. }
  68. return 0;
  69. }
  70. forward camupdate(playerid); public camupdate(playerid){
  71.  
  72. new Float:x, Float:y, Float:z,Float:Angle;
  73. GetPlayerFacingAngle(playerid, Angle);
  74. GetPlayerPos(playerid, x, y, z);
  75. SetPlayerCameraPos(playerid,x-0.0521, y+4.9186, z+3.0943);
  76. SetPlayerCameraLookAt(playerid, x+0.1750,y+17.2305,z+1.9283);
  77. SetPlayerFacingAngle( playerid, Angle );
  78. return true;
  79. }
  80.  
  81. obj(){
  82. Vvar[0] = CreateObject(19427, -1.58210, -3.31840, 1.96860, 89.94000, 0.00000, 0.00000);//0
  83. Vvar[1] = CreateObject(19427, -1.58410, 0.08660, 1.96860, 89.94000, 0.00000, 0.00000);//1
  84. Vvar[2] = CreateObject(19427, -1.57410, 3.12860, 1.96860, 89.94000, 0.00000, 0.00000);//2
  85. Vvar[3] = CreateObject(19427, 1.73790, 3.09460, 1.96860, 89.94000, 0.00000, 0.00000);//3
  86. Vvar[4] = CreateObject(19427, 1.73810, 0.06470, 1.96860, 89.94000, 0.00000, 0.00000);//4
  87. Vvar[5] = CreateObject(19427, 1.73390, -3.31840, 1.96860, 89.94000, 0.00000, 0.00000);//5
  88. Vvar[6] = CreateObject(19427, 0.07690, -5.16000, 1.97060, 90.00000, 0.00000, 89.91000);//6
  89. Vvar[7] = CreateObject(19400, -1.58580, -0.24620, 4.51750, 0.00000, 0.00000, 0.00000);//7
  90. Vvar[8] = CreateObject(19400, -1.58340, -3.46420, 4.51750, 0.00000, 0.00000, 0.00000);//8
  91. Vvar[9] = CreateObject(19400, -1.5874, 2.9653, 4.5175, 0.00000, 0.00000, 0.00000);//9
  92. Vvar[10] = CreateObject(19400, 1.73420, 2.96580, 4.51750, 0.00000, 0.00000, 0.00000);//10
  93. Vvar[11] = CreateObject(19400, 1.73420, -0.24820, 4.51750, 0.00000, 0.00000, 0.00000);//11
  94. Vvar[12] = CreateObject(19400, 1.73420, -3.46020, 4.51750, 0.00000, 0.00000, 0.00000);//12
  95. Vvar[13] = CreateObject(19427, 0.04990, 4.78500, 2.16060, 90.00000, 0.00000, 89.91000);//13
  96. Vvar[14] = CreateObject(19370, 0.07610, -3.45870, 2.09030, 0.00000, 90.07200, 0.00000);//14
  97. Vvar[15] = CreateObject(19370, 0.07540, -0.27370, 2.09030, 0.00000, 90.07200, 0.00000);//15
  98. Vvar[16] = CreateObject(19370, 0.07540, 2.94530, 2.09030, 0.00000, 90.07200, 0.00000);//16
  99. Vvar[17] = CreateObject(19427, 0.07690, -5.16000, 3.52460, 90.00000, 0.00000, 89.91000);//17
  100. Vvar[18] = CreateObject(19427, 0.07690, -5.16000, 5.46360, 90.00000, 0.00000, 89.91000);//18
  101. Vvar[19] = CreateObject(19427, 0.07690, -5.16200, 3.91860, 90.00000, 0.00000, 89.91000);//19
  102. Vvar[20] = CreateObject(19427, 0.04990, 4.78500, 5.48460, 90.00000, 0.00000, 89.91000);//20
  103. Vvar[21] = CreateObject(1649, 0.04780, 4.81590, 4.02270, 0.00000, 90.00000, -0.12600);//21
  104. Vvar[22] = CreateObject(1649, 1.75990, 3.21330, 4.02270, 0.00000, 90.00000, 90.00000);//22
  105. Vvar[23] = CreateObject(1649, 1.75990, 0.02730, 4.02270, 0.00000, 90.00000, 90.00000);//23
  106. Vvar[24] = CreateObject(1649, 1.75990, -3.39470, 4.02270, 0.00000, 90.00000, 90.00000);//24
  107. Vvar[25] = CreateObject(1649, -1.60310, -3.39470, 4.02270, 0.00000, 90.00000, 90.00000);//25
  108. Vvar[26] = CreateObject(1649, -1.60310, -0.14970, 4.02270, 0.00000, 90.00000, 90.00000);//26
  109. Vvar[27] = CreateObject(1649, -1.60310, 3.15430, 4.02270, 0.00000, 90.00000, 90.00000);//27
  110. Vvar[28] = CreateObject(2639, 0.06138, -4.70353, 2.80040, 0.00000, 0.00000, 0.00000);
  111. Vvar[29] = CreateObject(2638, 0.58390, -2.89330, 2.81190, 0.00000, 0.00000, 0.00000);
  112. Vvar[30] = CreateObject(2638, 0.58390, -0.48730, 2.81190, 0.00000, 0.00000, 0.00000);
  113. Vvar[31] = CreateObject(2638, 0.58390, 1.94270, 2.81190, 0.00000, 0.00000, 0.00000);
  114. Vvar[32] = CreateObject(2639, 0.58404, 3.88933, 2.80040, 0.00000, 0.00000, 0.00000);
  115. Vvar[33] = CreateObject(19354, 0.07320, -3.63370, 6.26420, 0.00000, 89.00000, 0.00000);
  116. Vvar[34] = CreateObject(19354, 0.07320, -0.41170, 6.26420, 0.00000, 89.00000, 0.00000);
  117. Vvar[35] = CreateObject(19354, 0.07320, 2.79930, 6.26420, 0.00000, 89.00000, 0.00000);
  118. Vvar[36] = CreateObject(19354, 0.07320, 3.27130, 6.26220, 0.00000, 89.00000, 0.00000);
  119. Vvar[37] = CreateObject(3785, 0.09090, 3.50780, 6.07670, 0.00000, -270.00000, 91.00000);
  120. Vvar[38] = CreateObject(3785, 0.09090, 1.50380, 6.07670, 0.00000, -270.00000, 91.00000);
  121. Vvar[39] = CreateObject(3785, 0.09090, -0.45720, 6.07670, 0.00000, -270.00000, 91.00000);
  122. Vvar[40] = CreateObject(3785, 0.09090, -2.52420, 6.07670, 0.00000, -270.00000, 91.00000);
  123. Vvar[41] = CreateObject(18647, 0.06430, -5.24450, 5.19590, 0.00000, 0.00000, 90.00000);
  124. Vvar[42] = CreateObject(18647, 0.06430, -5.24450, 5.61990, 0.00000, 0.00000, 90.00000);
  125. Vvar[43] = CreateObject(18647, 0.06430, -5.24450, 6.04390, 0.00000, 0.00000, 90.00000);
  126. Vvar[44] = CreateObject(18647, 0.06430, -5.24450, 4.77190, 0.00000, 0.00000, 90.00000);
  127. Vvar[45] = CreateObject(18647, 0.06430, -5.24450, 4.34790, 0.00000, 0.00000, 90.00000);
  128. Vvar[46] = CreateObject(18647, 0.06430, -5.24450, 3.92390, 0.00000, 0.00000, 90.00000);
  129. Vvar[47] = CreateObject(18647, 0.06430, -5.24450, 3.49990, 0.00000, 0.00000, 90.00000);
  130. return true;
  131. }
  132.  
  133. CreateVcoash(playerid){
  134.  
  135. new Float:x, Float:y, Float:z;
  136. GetPlayerPos(playerid, x, y, z);
  137. Var = true;
  138. Veh = CreateVehicle(437, x,y,z, 82.2873, 0, 1, 60);
  139. AttachObjectToVehicle(Vvar[0], Veh, -1.58210, -3.31840, 1.96860, 89.94000, 0.00000, 0.00000);
  140. AttachObjectToVehicle(Vvar[1], Veh, -1.58410, 0.08660, 1.96860, 89.94000, 0.00000, 0.00000);
  141. AttachObjectToVehicle(Vvar[2], Veh, -1.57410, 3.12860, 1.96860, 89.94000, 0.00000, 0.00000);
  142. AttachObjectToVehicle(Vvar[3], Veh, 1.7399, 3.0946, 1.9686, 89.94000, 0.00000, 0.00000);
  143. AttachObjectToVehicle(Vvar[4], Veh, 1.73810, 0.06470, 1.96860, 89.94000, 0.00000, 0.00000);
  144. AttachObjectToVehicle(Vvar[5], Veh, 1.73390, -3.31840, 1.96860, 89.94000, 0.00000, 0.00000);
  145. AttachObjectToVehicle(Vvar[6], Veh, 0.07690, -5.16000, 1.97060, 90.00000, 0.00000, 89.91000);
  146. AttachObjectToVehicle(Vvar[7], Veh, -1.58580, -0.24620, 4.51750, 0.00000, 0.00000, 0.00000);
  147. AttachObjectToVehicle(Vvar[8], Veh, -1.58340, -3.46420, 4.51750, 0.00000, 0.00000, 0.00000);
  148. AttachObjectToVehicle(Vvar[9], Veh, -1.5874, 2.9653, 4.5175, 0.00000, 0.00000, 0.00000);
  149. AttachObjectToVehicle(Vvar[10], Veh, 1.73420, 2.96580, 4.51750, 0.00000, 0.00000, 0.00000);
  150. AttachObjectToVehicle(Vvar[11], Veh, 1.73420, -0.24820, 4.51750, 0.00000, 0.00000, 0.00000);
  151. AttachObjectToVehicle(Vvar[12], Veh, 1.73420, -3.46020, 4.51750, 0.00000, 0.00000, 0.00000);
  152. AttachObjectToVehicle(Vvar[13], Veh, 0.04990, 4.78500, 2.16060, 90.00000, 0.00000, 89.91000);
  153. AttachObjectToVehicle(Vvar[14], Veh, 0.07610, -3.45870, 2.09030, 0.00000, 90.07200, 0.00000);
  154. AttachObjectToVehicle(Vvar[15], Veh, 0.07540, -0.27370, 2.09030, 0.00000, 90.07200, 0.00000);
  155. AttachObjectToVehicle(Vvar[16], Veh, 0.07540, 2.94530, 2.09030, 0.00000, 90.07200, 0.00000);
  156. AttachObjectToVehicle(Vvar[17], Veh, 0.07690, -5.16000, 3.52460, 90.00000, 0.00000, 89.91000);
  157. AttachObjectToVehicle(Vvar[18], Veh, 0.07690, -5.16000, 5.46360, 90.00000, 0.00000, 89.91000);
  158. AttachObjectToVehicle(Vvar[19], Veh, 0.07690, -5.16200, 3.91860, 90.00000, 0.00000, 89.91000);
  159. AttachObjectToVehicle(Vvar[20], Veh, 0.04990, 4.78500, 5.48460, 90.00000, 0.00000, 89.91000);
  160. AttachObjectToVehicle(Vvar[21], Veh, 0.04780, 4.81590, 4.02270, 0.00000, 90.00000, -0.12600);
  161. AttachObjectToVehicle(Vvar[22], Veh, 1.75990, 3.21330, 4.02270, 0.00000, 90.00000, 90.00000);
  162. AttachObjectToVehicle(Vvar[23], Veh, 1.75990, 0.02730, 4.02270, 0.00000, 90.00000, 90.00000);
  163. AttachObjectToVehicle(Vvar[24], Veh, 1.75990, -3.39470, 4.02270, 0.00000, 90.00000, 90.00000);
  164. AttachObjectToVehicle(Vvar[25], Veh, -1.60310, -3.39470, 4.02270, 0.00000, 90.00000, 90.00000);
  165. AttachObjectToVehicle(Vvar[26], Veh, -1.60310, -0.14970, 4.02270, 0.00000, 90.00000, 90.00000);
  166. AttachObjectToVehicle(Vvar[27], Veh, -1.60310, 3.15430, 4.02270, 0.00000, 90.00000, 90.00000);
  167. AttachObjectToVehicle(Vvar[28], Veh, 0.06138, -4.70353, 2.80040, 0.00000, 0.00000, 0.00000);
  168. AttachObjectToVehicle(Vvar[29], Veh, 0.58390, -2.89330, 2.81190, 0.00000, 0.00000, 0.00000);
  169. AttachObjectToVehicle(Vvar[30], Veh, 0.58390, -0.48730, 2.81190, 0.00000, 0.00000, 0.00000);
  170. AttachObjectToVehicle(Vvar[31], Veh, 0.58390, 1.94270, 2.81190, 0.00000, 0.00000, 0.00000);
  171. AttachObjectToVehicle(Vvar[32], Veh, 0.58404, 3.88933, 2.80040, 0.00000, 0.00000, 0.00000);
  172. AttachObjectToVehicle(Vvar[33], Veh, 0.07320, -3.63370, 6.26420, 0.00000, 89.00000, 0.00000);
  173. AttachObjectToVehicle(Vvar[34], Veh, 0.07320, -0.41170, 6.26420, 0.00000, 89.00000, 0.00000);
  174. AttachObjectToVehicle(Vvar[35], Veh, 0.07320, 2.79930, 6.26420, 0.00000, 89.00000, 0.00000);
  175. AttachObjectToVehicle(Vvar[36], Veh, 0.07320, 3.27130, 6.26220, 0.00000, 89.00000, 0.00000);
  176. AttachObjectToVehicle(Vvar[37], Veh, 0.09090, 3.50780, 6.07670, 0.00000, -270.00000, 91.00000);
  177. AttachObjectToVehicle(Vvar[38], Veh, 0.09090, 1.50380, 6.07670, 0.00000, -270.00000, 91.00000);
  178. AttachObjectToVehicle(Vvar[39], Veh, 0.09090, 1.50380, 6.07670, 0.00000, -270.00000, 91.00000);
  179. AttachObjectToVehicle(Vvar[40], Veh, 0.09090, -0.45720, 6.07670, 0.00000, -270.00000, 91.00000);
  180. AttachObjectToVehicle(Vvar[41], Veh, 0.09090, -2.52420, 6.07670, 0.00000, -270.00000, 91.00000);
  181. AttachObjectToVehicle(Vvar[42], Veh, 0.06430, -5.24450, 5.19590, 0.00000, 0.00000, 90.00000);
  182. AttachObjectToVehicle(Vvar[43], Veh, 0.06430, -5.24450, 5.61990, 0.00000, 0.00000, 90.00000);
  183. AttachObjectToVehicle(Vvar[44], Veh, 0.06430, -5.24450, 6.04390, 0.00000, 0.00000, 90.00000);
  184. AttachObjectToVehicle(Vvar[45], Veh, 0.06430, -5.24450, 4.77190, 0.00000, 0.00000, 90.00000);
  185. AttachObjectToVehicle(Vvar[46], Veh, 0.06430, -5.24450, 4.34790, 0.00000, 0.00000, 90.00000);
  186. AttachObjectToVehicle(Vvar[47], Veh, 0.06430, -5.24450, 3.92390, 0.00000, 0.00000, 90.00000);
  187. // AttachObjectToVehicle(Vvar[48], Veh, 0.06430, -5.24450, 3.49990, 0.00000, 0.00000, 90.00000);
  188. return true;
  189. }
  190.  
  191. DestroyVcoash(playerid){
  192.  
  193. Var = false;
  194. DestroyVehicle(Veh);
  195. for(new i = 0; i < 48; i++)
  196. {
  197. if(Var == true) continue;
  198. DestroyObject(Vvar[i]);
  199. }
  200. SetCameraBehindPlayer(playerid);
  201. KillTimer(Timer);
  202. return true;
  203. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement