Guest User

achhraf

a guest
Mar 16th, 2013
384
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.33 KB | None | 0 0
  1. //----------------------------------[GOTO]-----------------------------------------------
  2. if(!strcmp(cmd,"/goto",true) || !strcmp(cmd,"/gotoid",true))
  3. {
  4. if(!(PlayerInfo[playerid][pAdmin] >= 2))
  5. return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use this command.");
  6. // process command
  7. tmp = strtok(cmdtext, idx);
  8. if(!strlen(tmp))
  9. {
  10. SendClientMessage(playerid, COLOR_WHITE,"USAGE: /goto [playerid] or /goto [place]");
  11. SendClientMessage(playerid, COLOR_WHITE,"Set your teleport destination with /mark");
  12. SendClientMessage(playerid, COLOR_LIGHTRED,"(( GENERAL: ls sf lvlsair sfair saints county gasstation VIP ))");
  13. SendClientMessage(playerid, COLOR_LIGHTRED,"(( GENERAL: mark ls sf lv lsair sfair saints county gasstation ))");
  14. SendClientMessage(playerid, COLOR_LIGHTRED,"(( GENERAL: tower chiliad airstrip bayside bank pier int1 bloodbowl ))");
  15. SendClientMessage(playerid, COLOR_LIGHTRED,"(( GENERAL: gym paintball 24/7 ))");
  16. SendClientMessage(playerid, COLOR_LIGHTRED,"(( OTHER: underwater jet battlefield 8track kickstart dirtbike dam ))");
  17. SendClientMessage(playerid, COLOR_LIGHTRED,"(( FACTIONS: hitman ss fbi rcsd demorgan ))");
  18. SendClientMessage(playerid, COLOR_LIGHTRED,"(( FAMILIES HQ: vla grove ballas rich ))");
  19. SendClientMessage(playerid, COLOR_LIGHTRED,"(( TUNE GARAGES: tune1 tune2 tune3 ))");
  20. SendClientMessage(playerid, COLOR_LIGHTRED,"(( POINTS: mp1 mf1 mp2 mf2 dh df cl sprunk ffc aec prison ))");
  21. return 1;
  22. }
  23. new
  24. p=1,
  25. Float:a = GetPlayerFacingAngle(playerid,a),
  26. destination[64] = " ",
  27. lookupid = ReturnUser(tmp);
  28.  
  29. if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) p=0;
  30. if(lookupid != INVALID_PLAYER_ID)
  31. {
  32. if(lookupid != playerid)
  33. {
  34. if(!gPlayerLogged[lookupid])
  35. return SendClientMessage(playerid, COLOR_GRAD2,"That player hasn't spawned yet.");
  36. if(GetPlayerState(lookupid) == PLAYER_STATE_SPECTATING)
  37. return SendClientMessage(playerid, COLOR_GRAD2,"That player is spectating someone.");
  38. }
  39. new
  40. Float:x,
  41. Float:y,
  42. Float:z,
  43. i = GetPlayerInterior(lookupid),
  44. v = GetPlayerVirtualWorld(lookupid);
  45. if(IsPlayerInAnyVehicle(lookupid))
  46. {
  47. GetVehicleZAngle(GetPlayerVehicleID(lookupid),a);
  48. } else {
  49. GetPlayerFacingAngle(lookupid,a);
  50. }
  51. GetPlayerPos(lookupid,x,y,z);
  52. Teleport(playerid,x,y+2,z,a,i,v,p);
  53. destination = PlayerName(lookupid);
  54. }
  55. else if(!strcmp(tmp,"lspd",true) || !strcmp(tmp,"ls",true))
  56. {
  57. destination = "Los Santos Police Department";
  58. Teleport(playerid,1529.6,-1691.2,13.3,a,0,0,p);
  59. }
  60. else if(!strcmp(tmp,"aryan",true))
  61. {
  62. destination = "Aryan Brotherhood HQ";
  63. Teleport(playerid, 2270.7239,-86.0490,26.5025,a,0,0,p);
  64. }
  65. else if(!strcmp(tmp,"int1",true))
  66. {
  67. destination = "Interior 1";
  68. Teleport(playerid,1411.1451,-0.5155,1000.9236,a,1,0,p);
  69. }
  70. else if(!strcmp(tmp,"gym",true))
  71. {
  72. destination = "Ganton Gym";
  73. Teleport(playerid,2225.4001,-1724.4464,13.5632,a,0,0,p);
  74. }
  75. else if(!strcmp(tmp,"lsair",true))
  76. {
  77. destination = "Los Santos Airport";
  78. Teleport(playerid,1934.9127,-2290.6362,13.5469,a,0,0,p);
  79. }
  80. else if(!strcmp(tmp,"sfair",true) || !strcmp(tmp,"sf",true))
  81. {
  82. destination = "San Fierro Airport";
  83. Teleport(playerid,-1417.0,-295.8,14.1,a,0,0,p);
  84. }
  85. else if(!strcmp(tmp,"lvair",true) || !strcmp(tmp,"lv",true))
  86. {
  87. destination = "Las Venturas Airport";
  88. Teleport(playerid,1699.2,1435.1, 10.7,a,0,0,p);
  89. }
  90. else if(!strcmp(tmp,"jet",true))
  91. {
  92. destination = "private jet";
  93. Teleport(playerid,1.71875, 30.4062, 1200.34,a,1,0,0);
  94. }
  95. else if (!strcmp(tmp,"chiliad",true))
  96. {
  97. destination = "Mt. Chiliad";
  98. Teleport(playerid,-2317.5325,-1644.9664,483.7031,a,0,0,p);
  99. }
  100. else if (!strcmp(tmp,"demorgan",true))
  101. {
  102. destination = "Area 51 - Demorgan";
  103. Teleport(playerid,202.1886,1881.4122,17.2199,37.8779,0,0,p);
  104. }
  105. else if (!strcmp(tmp,"airstrip",true))
  106. {
  107. destination = "Desert Airstrip";
  108. Teleport(playerid,357.5273,2513.8701,16.5856,a,0,0,p);
  109. }
  110. else if (!strcmp(tmp,"tower",true) || !strcmp(tmp,"sky",true))
  111. {
  112. destination = "Star Tower";
  113. Teleport(playerid,1543.9886,-1353.7587,329.4735,a,0,0,p);
  114. }
  115. else if (!strcmp(tmp,"bayside",true))
  116. {
  117. destination = "Bayside Heliport";
  118. Teleport(playerid,-2252.2944,2335.5396,4.8125,a,0,0,p);
  119. }
  120. else if (!strcmp(tmp,"underwater",true) || !strcmp(tmp,"under",true))
  121. {
  122. destination = "under the sea";
  123. Teleport(playerid,-1005.3044,657.4559,-39.0847,a,0,0,p);
  124. }
  125. else if (!strcmp(tmp,"bank",true))
  126. {
  127. destination = "The Bank";
  128. Teleport(playerid,1462.395751,-1016.391174,25.84375,a,0,0,p);
  129. }
  130. else if (!strcmp(tmp,"pier",true))
  131. {
  132. destination = "the fishing pier";
  133. Teleport(playerid,364.9920,-2059.7288,15.3990,a,0,0,p);
  134. }
  135. else if (!strcmp(tmp,"battlefield",true) || !strcmp(tmp,"battle",true))
  136. {
  137. destination = "the battlefield";
  138. Teleport(playerid,-972.4957,1060.9830,1345.6690,a,10,0,p);
  139. }
  140. else if (!strcmp(tmp,"dam",true))
  141. {
  142. destination = "the Sherman Dam";
  143. Teleport(playerid,-715.0000,2062.0000,60.0000,a,0,0,p);
  144. }
  145. else if (!strcmp(tmp,"bloodbowl",true))
  146. {
  147. destination = "Bloodbowl Arena";
  148. Teleport(playerid,-1394.5928,996.4797,1033.8864,a,15,0,p);
  149. }
  150. else if (!strcmp(tmp,"8track",true))
  151. {
  152. destination = "8-Track Stadium";
  153. Teleport(playerid,-1406.3815,-262.7644,1043.4290,346.8336,7,0,p);
  154. }
  155. else if (!strcmp(tmp,"dirtbike",true))
  156. {
  157. destination = "Dirtbike Stadium";
  158. Teleport(playerid,-1436.2065,-642.5217,1049.5261,167.3703,4,0,p);
  159. }
  160. else if (!strcmp(tmp,"kickstart",true))
  161. {
  162. destination = "Kickstart Stadium";
  163. Teleport(playerid,-1447.2618,1604.3374,1052.5220,263.7223,14,0,p);
  164. }
  165. else if (!strcmp(tmp,"hitman",true))
  166. {
  167. destination = "Hitman Agency - SF HQ";
  168. Teleport(playerid,-2535.1885,-688.6639,139.3203,335.7327,0,0,p);
  169. }
  170. else if (!strcmp(tmp,"ss",true))
  171. {
  172. destination = "Secret Society";
  173. Teleport(playerid,-51.5869,-275.1585,5.4297,353.7715,0,0,p);
  174. }
  175. else if (!strcmp(tmp,"fbi",true))
  176. {
  177. destination = "FBI Department";
  178. Teleport(playerid,1040.2537,1019.9399,11.0000,174.6930,0,0,p);
  179. }
  180. else if (!strcmp(tmp,"paintball",true))
  181. {
  182. destination = "Paintball Arena";
  183. Teleport(playerid,1798.1211,-1169.2134,23.8281,a,0,0,p);
  184. }
  185. else if (!strcmp(tmp,"24/7",true))
  186. {
  187. destination = "24/7 Store";
  188. Teleport(playerid,1314.5610,-913.7150,38.1331,a,0,0,p);
  189. }
  190. else if (!strcmp(tmp,"tune1",true))
  191. {
  192. destination = "Lowrider Tuning Shop";
  193. Teleport(playerid,2644.9026,-2005.4315,13.3828,a,0,0,p);
  194. }
  195. else if (!strcmp(tmp,"vip",true))
  196. {
  197. destination = "VIP";
  198. Teleport(playerid,1133.2164,-9.1820,1000.6797,a,12,0,p);
  199. }
  200. else if (!strcmp(tmp,"tune2",true))
  201. {
  202. destination = "Los Santos Tuning Shop";
  203. Teleport(playerid,1025.1035,-1039.0695,31.5661,a,0,0,p);
  204. }
  205. else if (!strcmp(tmp,"tune3",true))
  206. {
  207. destination = "San Fierro Tuning Shop";
  208. Teleport(playerid,-2702.4583,217.1397,4.1797,a,0,0,p);
  209. }
  210. else if (!strcmp(tmp,"mp1",true))
  211. {
  212. destination = "Material Pickup 1";
  213. Teleport(playerid,1430.8533,-1327.6997,13.5657,a,0,0,p);
  214. }
  215. else if (!strcmp(tmp,"mf1",true))
  216. {
  217. destination = "Material Factory 1";
  218. Teleport(playerid,2183.5547,-2279.0374,13.5469,a,0,0,p);
  219. }
  220. else if (!strcmp(tmp,"mp2",true))
  221. {
  222. destination = "Material Pickup 2";
  223. Teleport(playerid,2397.6951,-2012.1493,13.5537,a,0,0,p);
  224. }
  225. else if (!strcmp(tmp,"mf2",true))
  226. {
  227. destination = "Material Factory 2";
  228. Teleport(playerid,2289.1423,-1116.5608,37.9766,a,0,0,p);
  229. }
  230. else if (!strcmp(tmp,"dh",true))
  231. {
  232. destination = "Drug House";
  233. Teleport(playerid,2174.9119,-1669.4958,15.0716,a,0,0,p);
  234. }
  235. else if (!strcmp(tmp,"df",true))
  236. {
  237. destination = "Drug Factory";
  238. Teleport(playerid,53.8947,-284.2078,1.6548,a,0,0,p);
  239. }
  240. else if (!strcmp(tmp,"cl",true))
  241. {
  242. destination = "Crack Labaratory";
  243. Teleport(playerid,2360.7083,-1161.9872,27.6096,a,0,0,p);
  244. }
  245. else if (!strcmp(tmp,"sprunk",true))
  246. {
  247. destination = "Sprunk Factory";
  248. Teleport(playerid,1342.1078,286.7178,19.5615,a,0,0,p);
  249. }
  250. else if (!strcmp(tmp,"ffc",true))
  251. {
  252. destination = "Fossil Fuel Company";
  253. Teleport(playerid,2648.7205,-2109.0586,13.5469,a,0,0,p);
  254. }
  255. else if (!strcmp(tmp,"aec",true))
  256. {
  257. destination = "Auto Export Company";
  258. Teleport(playerid,2753.0408,-2433.9844,13.6484,a,0,0,p);
  259. }
  260. else if (!strcmp(tmp,"rcsd",true))
  261. {
  262. destination = "Sheriff's Department";
  263. Teleport(playerid,625.7545,-588.1606,16.7991,a,0,0,p);
  264. }
  265. else if (!strcmp(tmp,"rich",true))
  266. {
  267. destination = "Richmond";
  268. Teleport(playerid,393.7295,-1241.3582,52.0572,a,0,0,p);
  269. }
  270. else if (!strcmp(tmp,"county",true))
  271. {
  272. destination = "General County Hospital";
  273. Teleport(playerid,2002.0876,-1448.0087,13.5606,a,0,0,p);
  274. }
  275. else if (!strcmp(tmp,"saints",true))
  276. {
  277. destination = "All Saints Hospital";
  278. Teleport(playerid,1188.8627,-1330.2386,13.5606,a,0,0,p);
  279. }
  280. else if (!strcmp(tmp,"ballas",true))
  281. {
  282. destination = "Glen Park - Ballas";
  283. Teleport(playerid,1971.5403,-1147.4678,25.8117,a,0,0,p);
  284. }
  285. else if (!strcmp(tmp,"grove",true))
  286. {
  287. destination = "Grove Street";
  288. Teleport(playerid,2496.1221,-1670.3540,13.3359,a,0,0,p);
  289. }
  290. else if(!strcmp(tmp,"prison",true) || !strcmp(tmp,"ls",true))
  291. {
  292. destination = "Los Santos Prison";
  293. Teleport(playerid,2055.98,-2033.31,867.25,a,0,0,p);
  294. }
  295. else if (!strcmp(tmp,"vla",true))
  296. {
  297. destination = "Varrios Los Aztecas Bar";
  298. Teleport(playerid,2785.3215,-1610.6592,10.9219,a,0,0,p);
  299. }
  300. else
  301. {
  302. return SendClientMessage(playerid, COLOR_FADE1,"Invalid destination.");
  303. }
  304. // format string and send to player
  305. format(string, sizeof(string),"Teleporting to %s",destination);
  306. SendClientMessage(playerid, COLOR_GRAD2,string);
  307. return 1;
  308. }
Advertisement
Add Comment
Please, Sign In to add comment