Advertisement
Guest User

Shoot And teleport :) v1.0

a guest
Jul 1st, 2014
319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.25 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. #include <zcmd>
  7.  
  8. /////+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++////
  9. new ModeOn = 0;
  10.  
  11. #if defined FILTERSCRIPT
  12.  
  13. public OnFilterScriptInit()
  14. {
  15. print("\n--------------------------------------");
  16. print(" Shoot And teleport");
  17. print("--------------------------------------\n");
  18. return 1;
  19. }
  20.  
  21. public OnFilterScriptExit()
  22. {
  23. return 1;
  24. }
  25.  
  26. #else
  27.  
  28. main()
  29. {
  30.  
  31. }
  32.  
  33. #endif
  34.  
  35. public OnGameModeInit()
  36. {
  37. // Don't use these lines if it's a filterscript
  38. return 1;
  39. }
  40.  
  41. public OnGameModeExit()
  42. {
  43. return 1;
  44. }
  45.  
  46. public OnPlayerRequestClass(playerid, classid)
  47. {
  48. return 1;
  49. }
  50.  
  51. public OnPlayerConnect(playerid)
  52. {
  53. ModeOn = 0;
  54. return 1;
  55. }
  56.  
  57. public OnPlayerDisconnect(playerid, reason)
  58. {
  59. return 1;
  60. }
  61.  
  62. public OnPlayerSpawn(playerid)
  63. {
  64. return 1;
  65. }
  66.  
  67. public OnPlayerDeath(playerid, killerid, reason)
  68. {
  69. return 1;
  70. }
  71.  
  72. public OnVehicleSpawn(vehicleid)
  73. {
  74. return 1;
  75. }
  76.  
  77. public OnVehicleDeath(vehicleid, killerid)
  78. {
  79. return 1;
  80. }
  81.  
  82. public OnPlayerText(playerid, text[])
  83. {
  84. return 1;
  85. }
  86.  
  87. public OnPlayerCommandText(playerid, cmdtext[])
  88. {
  89. if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  90. {
  91. // Do something here
  92. return 1;
  93. }
  94. return 0;
  95. }
  96.  
  97. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  98. {
  99. return 1;
  100. }
  101.  
  102. public OnPlayerExitVehicle(playerid, vehicleid)
  103. {
  104. return 1;
  105. }
  106.  
  107. public OnPlayerStateChange(playerid, newstate, oldstate)
  108. {
  109. return 1;
  110. }
  111.  
  112. public OnPlayerEnterCheckpoint(playerid)
  113. {
  114. return 1;
  115. }
  116.  
  117. public OnPlayerLeaveCheckpoint(playerid)
  118. {
  119. return 1;
  120. }
  121.  
  122. public OnPlayerEnterRaceCheckpoint(playerid)
  123. {
  124. return 1;
  125. }
  126.  
  127. public OnPlayerLeaveRaceCheckpoint(playerid)
  128. {
  129. return 1;
  130. }
  131.  
  132. public OnRconCommand(cmd[])
  133. {
  134. return 1;
  135. }
  136.  
  137. public OnPlayerRequestSpawn(playerid)
  138. {
  139. return 1;
  140. }
  141.  
  142. public OnObjectMoved(objectid)
  143. {
  144. return 1;
  145. }
  146.  
  147. public OnPlayerObjectMoved(playerid, objectid)
  148. {
  149. return 1;
  150. }
  151.  
  152. public OnPlayerPickUpPickup(playerid, pickupid)
  153. {
  154. return 1;
  155. }
  156.  
  157. public OnVehicleMod(playerid, vehicleid, componentid)
  158. {
  159. return 1;
  160. }
  161.  
  162. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  163. {
  164. return 1;
  165. }
  166.  
  167. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  168. {
  169. return 1;
  170. }
  171.  
  172. public OnPlayerSelectedMenuRow(playerid, row)
  173. {
  174. return 1;
  175. }
  176.  
  177. public OnPlayerExitedMenu(playerid)
  178. {
  179. return 1;
  180. }
  181.  
  182. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  183. {
  184. return 1;
  185. }
  186.  
  187. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  188. {
  189. return 1;
  190. }
  191.  
  192. public OnRconLoginAttempt(ip[], password[], success)
  193. {
  194. return 1;
  195. }
  196.  
  197. public OnPlayerUpdate(playerid)
  198. {
  199. return 1;
  200. }
  201.  
  202. public OnPlayerStreamIn(playerid, forplayerid)
  203. {
  204. return 1;
  205. }
  206.  
  207. public OnPlayerStreamOut(playerid, forplayerid)
  208. {
  209. return 1;
  210. }
  211.  
  212. public OnVehicleStreamIn(vehicleid, forplayerid)
  213. {
  214. return 1;
  215. }
  216.  
  217. public OnVehicleStreamOut(vehicleid, forplayerid)
  218. {
  219. return 1;
  220. }
  221.  
  222. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  223. {
  224. return 1;
  225. }
  226.  
  227. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  228. {
  229. return 1;
  230. }
  231.  
  232. public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
  233. {
  234. if(GetPlayerWeapon(playerid) != 34) return 1;
  235. if(ModeOn == 1)
  236. {
  237. new lsString[128],
  238. Float:fOriginX, Float:fOriginY, Float:fOriginZ,
  239. Float:fHitPosX, Float:fHitPosY, Float:fHitPosZ;
  240. GetPlayerLastShotVectors(playerid, fOriginX, fOriginY, fOriginZ, fHitPosX, fHitPosY, fHitPosZ);
  241. //format(lsString, 128, "Last Shot Information: Origin: %f, %f, %f. Hit position: %f, %f, %f", fOriginX, fOriginY, fOriginZ, fHitPosX, fHitPosY, fHitPosZ);// Add this if u want un comment it ...
  242. //SendClientMessage(playerid, -1, lsString);
  243. SetPlayerPos(playerid, fHitPosX, fHitPosY, fHitPosZ + 3);
  244. CreateExplosion(fOriginX, fOriginY, fOriginZ, 7, 5.0);
  245. }
  246.  
  247. return 1;
  248. }
  249.  
  250. CMD:telemodeon(playerid, params[])
  251. {
  252. SetPlayerArmour(playerid, 9999999999);
  253. SetPlayerHealth(playerid, 999999);
  254. ModeOn = 1;
  255. }
  256.  
  257. CMD:telemodeoff(playerid, params[])
  258. {
  259. SetPlayerHealth(playerid, 100);
  260. ModeOn = 0;
  261. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement