Advertisement
xTurbox

Teleport system by Turbo

Sep 4th, 2015
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.66 KB | None | 0 0
  1. /*==============================================================================
  2. CopyRight
  3. ================================================================================
  4. You are not allowed to re-release this without my permission
  5. You can ask for my permission via pm at http://forum.sa-mp.com/member.php?u=265327
  6. */
  7. /*==============================================================================
  8. Change Log
  9. ================================================================================
  10. _______________~~version v1.0~~__________________
  11. -TELEPORT CMDS
  12. /sfairport
  13. /wangcars
  14. /ottocars
  15. /transfender
  16. /carrier
  17. /gym
  18. /teleports
  19. _______________~~Version v1.5~~___________________
  20. /sfbeach
  21. /paynspray
  22. /sp1
  23. /sp2
  24. /hospital
  25. /archangels
  26. /policedept
  27. /policegarage
  28. /ammunation
  29. /supasave
  30. ___________________~~VERSION v2.0~~___________________
  31. /thelp
  32. /tcredits
  33. /sfa (short for
  34. /sfb
  35. /pns
  36. /pd
  37. /ds
  38. /pg
  39. /ss
  40. /arch
  41. /ammu
  42. /oc
  43. /wc
  44. /tf
  45. ================================================================================
  46. Includes
  47. ================================================================================
  48. */
  49. #include <a_samp>
  50. #include <izcmd>
  51.  
  52. //==============================================================================
  53. // Colors
  54. //==============================================================================
  55. #define COLOR_RED 0xFF0000
  56. #define COLOR_GREEN 0x00FF00FF
  57. #define COLOR_YELLOW 0xFFFF00FF
  58. #define FILTERSCRIPT
  59.  
  60.  
  61.  
  62. #if defined FILTERSCRIPT
  63. //==============================================================================
  64. // OnFilterScriptInit and OnFilterScriptExit
  65. //==============================================================================
  66.  
  67. public OnFilterScriptInit()
  68. {
  69. print("\n--------------------------------------");
  70. print(" Sanfierro Teleport System by Turbo loaded");
  71. print("--------------------------------------\n");
  72. return 1;
  73. }
  74.  
  75. public OnFilterScriptExit()
  76. {
  77. print("\n--------------------------------------");
  78. print(" Sanfierro Teleport System by Turbo unloaded");
  79. print("--------------------------------------\n");
  80. return 1;
  81. }
  82.  
  83. #endif
  84. //==============================================================================
  85. // Commands/functions
  86. //==============================================================================
  87. CMD:teleports(playerid,param[])
  88. {
  89. ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Teleport Commands"," /sfairport\t-/sfa\n /drivingschool\t /ds\n /ottocars\t /oc\n /wangcars\t /wc\n /carrier\n /transfender\t /tf\n /gym\n /ammunation\t /ammu\n /sp1\t /sp2 special locations\n /supasave\t /ss\n /hospital\n /archangels\t /arch\n /policedept\t /pd\n /policegarage\t /pg\n /sfbeach\t /sfb\n /paynspray\t /pns","close","");
  90. return 1;
  91. }
  92. CMD:sfairport(playerid,params[])
  93. {
  94. //checks whether the player is in any vehicle
  95. if(IsPlayerInAnyVehicle(playerid))
  96. {
  97. new vehicleid = GetPlayerVehicleID(playerid);
  98. //set vehicle position if he is in a vehicle
  99. SetVehiclePos(vehicleid,-1534.4138,-75.4995,14.1484,307.1554);
  100. //Gametext and client message for the player
  101. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to sanfierro airport successfully!");
  102. GameTextForPlayer(playerid, "~b~~h~You have teleported to sf airport!", 3000, 3);
  103. }
  104. //if the player is on foot
  105. else
  106. {
  107. SetPlayerPos(playerid,-1534.4138,-75.4995,14.1484,307.1554);//set the player position
  108. SetPlayerFacingAngle(playerid,180);//set the player facing angle
  109. SetPlayerInterior(playerid,0);//set the player interior ( so that he wont be bugged if teleported from another interior)eg:teleport from inside the ammunation
  110. SetCameraBehindPlayer(playerid);//fix the camera position
  111. //client message and game text
  112. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to sanfierro airport successfully!");
  113. GameTextForPlayer(playerid, "~b~~h~You have teleported to sf airport!", 3000, 3);
  114. }
  115. return 1;
  116. }
  117. COMMAND:sfa(playerid, params[])
  118. {
  119. return cmd_sfairport(playerid, params);
  120. }
  121. CMD:wangcars(playerid,params[])
  122. {
  123.  
  124. if(IsPlayerInAnyVehicle(playerid))
  125. {
  126. new vehicleid = GetPlayerVehicleID(playerid);
  127. SetVehiclePos(vehicleid,-1978.0193,276.1283,35.1719,333.1878);
  128. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to wangcars successfully!");
  129. GameTextForPlayer(playerid, "~b~~h~You have teleported to wangcars!", 3000, 3);
  130. }
  131. else
  132. {
  133. SetPlayerPos(playerid,-1978.0193,276.1283,35.1719,333.1878);
  134. SetPlayerFacingAngle(playerid,180);
  135. SetPlayerInterior(playerid,0);
  136. SetCameraBehindPlayer(playerid);
  137. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to wangcars successfully!");
  138. GameTextForPlayer(playerid, "~b~~h~You have teleported to wangcars!", 3000, 3);
  139. }
  140. return 1;
  141. }
  142. COMMAND:wc(playerid, params[])
  143. {
  144. return cmd_wangcars(playerid, params);
  145. }
  146. CMD:ottocars(playerid,params[])
  147. {
  148.  
  149. if(IsPlayerInAnyVehicle(playerid))
  150. {
  151. new vehicleid = GetPlayerVehicleID(playerid);
  152. SetVehiclePos(vehicleid,-1637.3621,1208.9797,7.1797,109.3371);
  153. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to ottocars successfully!");
  154. GameTextForPlayer(playerid, "~b~~h~You have teleported to ottocars!", 3000, 3);
  155. }
  156. else
  157. SetPlayerPos(playerid,-1637.3621,1208.9797,7.1797,109.3371);
  158. SetPlayerFacingAngle(playerid,180);
  159. SetPlayerInterior(playerid,0);
  160. SetCameraBehindPlayer(playerid);
  161. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to ottocars successfully!");
  162. GameTextForPlayer(playerid, "~b~~h~You have teleported to ottocars!", 3000, 3);
  163. return 1;
  164. }
  165. COMMAND:oc(playerid, params[])
  166. {
  167. return cmd_ottocars(playerid, params);
  168. }
  169. CMD:carrier(playerid,params[])
  170. {
  171.  
  172. if(IsPlayerInAnyVehicle(playerid))
  173. {
  174. new vehicleid = GetPlayerVehicleID(playerid);
  175. SetVehiclePos(vehicleid,-1407.0273,500.6602,18.2294,264.6461);
  176. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to aircraft carrier successfully!");
  177. GameTextForPlayer(playerid, "~b~~h~You have teleported to aircraftcarrier!", 3000, 3);
  178. }
  179. else
  180. SetPlayerPos(playerid,-1407.0273,500.6602,18.2294,264.6461);
  181. SetPlayerFacingAngle(playerid,180);
  182. SetPlayerInterior(playerid,0);
  183. SetCameraBehindPlayer(playerid);
  184. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to aircraft carrier successfully!");
  185. GameTextForPlayer(playerid, "~b~~h~You have teleported to aircraftcarrier!", 3000, 3);
  186. return 1;
  187. }
  188. CMD:transfender(playerid,params[])
  189. {
  190.  
  191. if(IsPlayerInAnyVehicle(playerid))
  192. {
  193. new vehicleid = GetPlayerVehicleID(playerid);
  194. SetVehiclePos(vehicleid,-1936.8915,228.1886,34.1563,349.5553);
  195. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to transfender successfully!");
  196. GameTextForPlayer(playerid, "~b~~h~You have teleported to transfender!", 3000, 3);
  197. }
  198. else
  199. SetPlayerPos(playerid,-1936.8915,228.1886,34.1563,349.5553);
  200. SetPlayerFacingAngle(playerid,180);
  201. SetPlayerInterior(playerid,0);
  202. SetCameraBehindPlayer(playerid);
  203. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to transfender successfully!");
  204. GameTextForPlayer(playerid, "~b~~h~You have teleported to transfender!", 3000, 3);
  205. return 1;
  206. }
  207. COMMAND:tf(playerid, params[])
  208. {
  209. return cmd_transfender(playerid, params);
  210. }
  211. CMD:gym(playerid,params[])
  212. {
  213.  
  214. if(IsPlayerInAnyVehicle(playerid))
  215. {
  216. new vehicleid = GetPlayerVehicleID(playerid);
  217. SetVehiclePos(vehicleid,-2267.1548,-155.2513,35.3203,95.4838);
  218. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to gym successfully!");
  219. GameTextForPlayer(playerid, "~b~~h~You have teleported to gym!", 3000, 3);
  220. }
  221. else
  222. SetPlayerPos(playerid,-2267.1548,-155.2513,35.3203,95.4838);
  223. SetPlayerFacingAngle(playerid,180);
  224. SetPlayerInterior(playerid,0);
  225. SetCameraBehindPlayer(playerid);
  226. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to gym successfully!");
  227. GameTextForPlayer(playerid, "~b~~h~You have teleported to gym!", 3000, 3);
  228. return 1;
  229. }
  230. CMD:drivingschool(playerid,params[])
  231. {
  232.  
  233. if(IsPlayerInAnyVehicle(playerid))
  234. {
  235. new vehicleid = GetPlayerVehicleID(playerid);
  236. SetVehiclePos(vehicleid,-2027.8280,-97.9614,35.1641,184.5735);
  237. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to driving school successfully!");
  238. GameTextForPlayer(playerid, "~b~~h~You have teleported to driving school!", 3000, 3);
  239. }
  240. else
  241. SetPlayerPos(playerid,-2027.8280,-97.9614,35.1641,184.5735);
  242. SetPlayerFacingAngle(playerid,180);
  243. SetPlayerInterior(playerid,0);
  244. SetCameraBehindPlayer(playerid);
  245. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to driving school successfully!");
  246. GameTextForPlayer(playerid, "~b~~h~You have teleported to driving school!", 3000, 3);
  247. return 1;
  248. }
  249. COMMAND:ds(playerid, params[])
  250. {
  251. return cmd_drivingschool(playerid, params);
  252. }
  253. //==============================================================================
  254. // Every thing below this is added in Version v1.5
  255. //==============================================================================
  256. CMD:ammunation(playerid,params[])
  257. {
  258.  
  259. if(IsPlayerInAnyVehicle(playerid))
  260. {
  261. new vehicleid = GetPlayerVehicleID(playerid);
  262. SetVehiclePos(vehicleid,-2625.4011,214.3997,4.4840,3.9662);
  263. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to ammunation successfully!");
  264. GameTextForPlayer(playerid, "~b~~h~You have teleported to ammunation!", 3000, 3);
  265. }
  266. else
  267. SetPlayerPos(playerid,-2625.4011,214.3997,4.4840,3.9662);
  268. SetPlayerFacingAngle(playerid,180);
  269. SetPlayerInterior(playerid,0);
  270. SetCameraBehindPlayer(playerid);
  271. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to ammunation successfully!");
  272. GameTextForPlayer(playerid, "~b~~h~You have teleported to ammunation!", 3000, 3);
  273. return 1;
  274. }
  275. COMMAND:ammu(playerid, params[])
  276. {
  277. return cmd_ammunation(playerid, params);
  278. }
  279. CMD:hospital(playerid,params[])
  280. {
  281.  
  282. if(IsPlayerInAnyVehicle(playerid))
  283. {
  284. new vehicleid = GetPlayerVehicleID(playerid);
  285. SetVehiclePos(vehicleid,-2657.2666,609.5692,14.4531,182.6165);
  286. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to hospital successfully!");
  287. GameTextForPlayer(playerid, "~b~~h~You have teleported to hospital!", 3000, 3);
  288. }
  289. else
  290. SetPlayerPos(playerid,-2657.2666,609.5692,14.4531,182.6165);
  291. SetPlayerFacingAngle(playerid,180);
  292. SetPlayerInterior(playerid,0);
  293. SetCameraBehindPlayer(playerid);
  294. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to hospital successfully!");
  295. GameTextForPlayer(playerid, "~b~~h~You have teleported to hospital!", 3000, 3);
  296. return 1;
  297. }
  298. COMMAND:ss(playerid, params[])
  299. {
  300. return cmd_supasave(playerid, params);
  301. }
  302. CMD:supasave(playerid,params[])
  303. {
  304.  
  305. if(IsPlayerInAnyVehicle(playerid))
  306. {
  307. new vehicleid = GetPlayerVehicleID(playerid);
  308. SetVehiclePos(vehicleid,-2442.4526,746.7072,35.0156,174.5741);
  309. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to supasave successfully!");
  310. GameTextForPlayer(playerid, "~b~~h~You have teleported to supasave!", 3000, 3);
  311. }
  312. else
  313. SetPlayerPos(playerid,-2442.4526,746.7072,35.0156,174.5741);
  314. SetPlayerFacingAngle(playerid,180);
  315. SetPlayerInterior(playerid,0);
  316. SetCameraBehindPlayer(playerid);
  317. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to supasave successfully!");
  318. GameTextForPlayer(playerid, "~b~~h~You have teleported to supasave!", 3000, 3);
  319. return 1;
  320. }
  321. CMD:archangels(playerid,params[])
  322. {
  323.  
  324. if(IsPlayerInAnyVehicle(playerid))
  325. {
  326. new vehicleid = GetPlayerVehicleID(playerid);
  327. SetVehiclePos(vehicleid,-2709.5054,217.1762,4.1797,89.9039);
  328. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to wheels arch angles successfully!");
  329. GameTextForPlayer(playerid, "~b~~h~You have teleported to wheelsarch angels!", 3000, 3);
  330. }
  331. else
  332. SetPlayerPos(playerid,-2709.5054,217.1762,4.1797,89.9039);
  333. SetPlayerFacingAngle(playerid,180);
  334. SetPlayerInterior(playerid,0);
  335. SetCameraBehindPlayer(playerid);
  336. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to wheels arch angles successfully!");
  337. GameTextForPlayer(playerid, "~b~~h~You have teleported to wheelsarch angels!", 3000, 3);
  338. return 1;
  339. }
  340. COMMAND:arch(playerid, params[])
  341. {
  342. return cmd_archangels(playerid, params);
  343. }
  344. CMD:sfbeach(playerid,params[])
  345. {
  346. if(IsPlayerInAnyVehicle(playerid))
  347. {
  348. new vehicleid = GetPlayerVehicleID(playerid);
  349. SetVehiclePos(vehicleid,-2876.0486,39.5524,5.8323,114.2606);
  350. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to sanfierro beach successfully!");
  351. GameTextForPlayer(playerid, "~b~~h~You have teleported to sanfierro beach!", 3000, 3);
  352. }
  353. else
  354. SetPlayerPos(playerid,-2876.0486,39.5524,5.8323,114.2606);
  355. SetPlayerFacingAngle(playerid,180);
  356. SetPlayerInterior(playerid,0);
  357. SetCameraBehindPlayer(playerid);
  358. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to sanfierro beach successfully!");
  359. GameTextForPlayer(playerid, "~b~~h~You have teleported to sanfierro beach!", 3000, 3);
  360. return 1;
  361. }
  362. COMMAND:sfb(playerid, params[])
  363. {
  364. return cmd_sfbeach(playerid, params);
  365. }
  366. CMD:paynspray(playerid,params[])
  367. {
  368.  
  369. if(IsPlayerInAnyVehicle(playerid))
  370. {
  371. new vehicleid = GetPlayerVehicleID(playerid);
  372. SetVehiclePos(vehicleid,-2427.0522,1039.0316,50.3906,174.3443);
  373. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to pay n spray successfully!");
  374. GameTextForPlayer(playerid, "~b~~h~You have teleported to pan n spray!", 3000, 3);
  375. }
  376. else
  377. SetPlayerPos(playerid,-2427.0522,1039.0316,50.3906,174.3443);
  378. SetPlayerFacingAngle(playerid,180);
  379. SetPlayerInterior(playerid,0);
  380. SetCameraBehindPlayer(playerid);
  381. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to pay n spray successfully!");
  382. GameTextForPlayer(playerid, "~b~~h~You have teleported to pan n spray!", 3000, 3);
  383. return 1;
  384. }
  385. COMMAND:pns(playerid, params[])
  386. {
  387. return cmd_paynspray(playerid, params);
  388. }
  389. CMD:policedept(playerid,params[])
  390. {
  391. if(IsPlayerInAnyVehicle(playerid))
  392. {
  393. new vehicleid = GetPlayerVehicleID(playerid);
  394. SetVehiclePos(vehicleid,-1605.5829,719.7681,11.9747,8.0200);
  395. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to police department successfully!");
  396. GameTextForPlayer(playerid, "~b~~h~You have teleported to police department!", 3000, 3);
  397. }
  398. else
  399. SetPlayerPos(playerid,-1605.5829,719.7681,11.9747,8.0200);
  400. SetPlayerFacingAngle(playerid,180);
  401. SetPlayerInterior(playerid,0);
  402. SetCameraBehindPlayer(playerid);
  403. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to police department successfully!");
  404. GameTextForPlayer(playerid, "~b~~h~You have teleported to police department!", 3000, 3);
  405. return 1;
  406. }
  407. COMMAND:pd(playerid, params[])
  408. {
  409. return cmd_policedept(playerid, params);
  410. }
  411. CMD:policegarage(playerid,params[])
  412. {
  413. if(IsPlayerInAnyVehicle(playerid))
  414. {
  415. new vehicleid = GetPlayerVehicleID(playerid);
  416. SetVehiclePos(vehicleid,-1631.6488,683.2217,-5.2422,251.1443);
  417. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to police garage successfully!");
  418. GameTextForPlayer(playerid, "~b~~h~You have teleported to police garage!", 3000, 3);
  419. }
  420. else
  421. SetPlayerPos(playerid,-1631.6488,683.2217,-5.2422,251.1443);
  422. SetPlayerFacingAngle(playerid,180);
  423. SetPlayerInterior(playerid,0);
  424. SetCameraBehindPlayer(playerid);
  425. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to police garage successfully!");
  426. GameTextForPlayer(playerid, "~b~~h~You have teleported to police garage!", 3000, 3);
  427. return 1;
  428. }
  429. COMMAND:pg(playerid, params[])
  430. {
  431. return cmd_policegarage(playerid, params);
  432. }
  433. CMD:sp1(playerid,params[])
  434. {
  435. if(IsPlayerInAnyVehicle(playerid))
  436. {
  437. SendClientMessage(playerid,COLOR_RED,"Error:You can't use this teleport command while in a vehicle");
  438. SendClientMessage(playerid,COLOR_RED,"Exit your vehicle first");
  439. GameTextForPlayer(playerid, "~b~~h~Please exit your vehicle before using this command!", 3000, 3);
  440. }
  441. else
  442. SetPlayerPos(playerid,-1374.4679,670.9106,84.0078,308.5341);
  443. SetPlayerFacingAngle(playerid,180);
  444. SetPlayerInterior(playerid,0);
  445. SetCameraBehindPlayer(playerid);
  446. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to a special location successfully!");
  447. GameTextForPlayer(playerid, "~b~~h~You have teleported to a special location!", 3000, 3);
  448. return 1;
  449. }
  450. CMD:sp2(playerid,params[])
  451. {
  452. if(IsPlayerInAnyVehicle(playerid))
  453. {
  454. SendClientMessage(playerid,COLOR_RED,"Error:You can't use this teleport command while in a vehicle");
  455. SendClientMessage(playerid,COLOR_RED,"Exit your vehicle first");
  456. GameTextForPlayer(playerid, "~b~~h~Please exit your vehicle before using this command!", 3000, 3);
  457. }
  458. else
  459. SetPlayerPos(playerid,-1531.3356,686.7694,133.0514,136.2212);
  460. SetPlayerFacingAngle(playerid,180);
  461. SetPlayerInterior(playerid,0);
  462. SetCameraBehindPlayer(playerid);
  463. SendClientMessage(playerid,COLOR_GREEN,"You have been teleported to a special location successfully!");
  464. GameTextForPlayer(playerid, "~b~~h~You have teleported to a special location!", 3000, 3);
  465. return 1;
  466. }
  467. CMD:thelp(playerid,params[])
  468. {
  469. ShowPlayerDialog(playerid,2,DIALOG_STYLE_MSGBOX,"Teleport Help","Use /teleports to see the avaliable place\n Use /tcredits to see the credits\n Use /thelp to see the help dialog(you are currently reading it)","close","");
  470. SendClientMessage(playerid,COLOR_YELLOW,"You are viewing the teleport help");
  471. return 1;
  472. }
  473. CMD:tcredits(playerid,param[])
  474. {
  475. ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"Teleport system credits","This teleport system was made from scratch by Turbo\n Special thanks to:\t Yashas for I-ZCMD\t(fastest command proccesser) edit of zcmd\n Zeex for original ZCMD","close");
  476. return 1;
  477. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement