Guest User

Untitled

a guest
Aug 27th, 2014
503
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.99 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. //#define FILTERSCRIPT
  4.  
  5. #include <a_samp>
  6. #define COLOR_YELLOW 0xFFFF00AA
  7. #define PRESSED(%0) \
  8. (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
  9. #define IsPlayerNotInVehicle(%0) (!IsPlayerInAnyVehicle(%0))
  10.  
  11.  
  12. #if defined FILTERSCRIPT
  13.  
  14. public OnFilterScriptInit()
  15. {
  16. print("\n--------------------------------------");
  17. print(" Vehicl Repair ");
  18. print("--------------------------------------\n");
  19. return 1;
  20. }
  21.  
  22. public OnFilterScriptExit()
  23. {
  24. return 1;
  25. }
  26.  
  27. if(strcmp("/Repair", cmdtext, true) == 0)
  28. {
  29. new vehicleid = GetPlayerVehicleID(playerid);
  30. SetVehicleHealth(vehicleid, 1000.0);
  31. SendClientMessage(playerid, COLOUR_WHITE, "Repaired ");
  32. return 1;
  33. }
  34.  
  35. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  36. {
  37. if(PRESSED(KEY_SUBMISSION))
  38. {
  39. new vehicleid = GetPlayerVehicleID(playerid);
  40. if(IsPlayerInVehicle(playerid, vehicleid))
  41. {
  42. SetVehicleHealth(vehicleid,1000.0);
  43. RepairVehicle(GetPlayerVehicleID(playerid));
  44. PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  45. SendClientMessage(playerid,COLOR_YELLOW,"Car fixed!");
  46. }
  47. }
  48. if(PRESSED(KEY_ACTION))
  49. {
  50. if(IsPlayerNotInVehicle(playerid))
  51. {
  52. SendClientMessage(playerid,COLOR_YELLOW,"You have to be in a car!");
  53. }
  54. }
  55. }
  56. #endif
  57. public OnGameModeExit()
  58. {
  59. return 1;
  60. }
  61.  
  62. public OnPlayerRequestClass(playerid, classid)
  63. {
  64. SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
  65. SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
  66. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  67. return 1;
  68. }
  69.  
  70. public OnPlayerConnect(playerid)
  71. {
  72. return 1;
  73. }
  74.  
  75. public OnPlayerDisconnect(playerid, reason)
  76. {
  77. return 1;
  78. }
  79.  
  80. public OnPlayerSpawn(playerid)
  81. {
  82. return 1;
  83. }
  84.  
  85. public OnPlayerDeath(playerid, killerid, reason)
  86. {
  87. return 1;
  88. }
  89.  
  90. public OnVehicleSpawn(vehicleid)
  91. {
  92. return 1;
  93. }
  94.  
  95. public OnVehicleDeath(vehicleid, killerid)
  96. {
  97. return 1;
  98. }
  99.  
  100. public OnPlayerText(playerid, text[])
  101. {
  102. return 1;
  103. }
  104.  
  105.  
  106. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  107. {
  108. return 1;
  109. }
  110.  
  111. public OnPlayerExitVehicle(playerid, vehicleid)
  112. {
  113. return 1;
  114. }
  115.  
  116. public OnPlayerStateChange(playerid, newstate, oldstate)
  117. {
  118. return 1;
  119. }
  120.  
  121. public OnPlayerEnterCheckpoint(playerid)
  122. {
  123. return 1;
  124. }
  125.  
  126. public OnPlayerLeaveCheckpoint(playerid)
  127. {
  128. return 1;
  129. }
  130.  
  131. public OnPlayerEnterRaceCheckpoint(playerid)
  132. {
  133. return 1;
  134. }
  135.  
  136. public OnPlayerLeaveRaceCheckpoint(playerid)
  137. {
  138. return 1;
  139. }
  140.  
  141. public OnRconCommand(cmd[])
  142. {
  143. return 1;
  144. }
  145.  
  146. public OnPlayerRequestSpawn(playerid)
  147. {
  148. return 1;
  149. }
  150.  
  151. public OnObjectMoved(objectid)
  152. {
  153. return 1;
  154. }
  155.  
  156. public OnPlayerObjectMoved(playerid, objectid)
  157. {
  158. return 1;
  159. }
  160.  
  161. public OnPlayerPickUpPickup(playerid, pickupid)
  162. {
  163. return 1;
  164. }
  165.  
  166. public OnVehicleMod(playerid, vehicleid, componentid)
  167. {
  168. return 1;
  169. }
  170.  
  171. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  172. {
  173. return 1;
  174. }
  175.  
  176. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  177. {
  178. return 1;
  179. }
  180.  
  181. public OnPlayerSelectedMenuRow(playerid, row)
  182. {
  183. return 1;
  184. }
  185.  
  186. public OnPlayerExitedMenu(playerid)
  187. {
  188. return 1;
  189. }
  190.  
  191. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  192. {
  193. return 1;
  194. }
  195.  
  196. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  197. {
  198. return 1;
  199. }
  200.  
  201. public OnRconLoginAttempt(ip[], password[], success)
  202. {
  203. return 1;
  204. }
  205.  
  206. public OnPlayerUpdate(playerid)
  207. {
  208. return 1;
  209. }
  210.  
  211. public OnPlayerStreamIn(playerid, forplayerid)
  212. {
  213. return 1;
  214. }
  215.  
  216. public OnPlayerStreamOut(playerid, forplayerid)
  217. {
  218. return 1;
  219. }
  220.  
  221. public OnVehicleStreamIn(vehicleid, forplayerid)
  222. {
  223. return 1;
  224. }
  225.  
  226. public OnVehicleStreamOut(vehicleid, forplayerid)
  227. {
  228. return 1;
  229. }
  230.  
  231. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  232. {
  233. return 1;
  234. }
  235.  
  236. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  237. {
  238. return 1;
  239. }
Advertisement
Add Comment
Please, Sign In to add comment