Advertisement
TonyVk

Dynamic Teleport System by TonyVk

May 10th, 2018
660
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.57 KB | None | 0 0
  1. ////////////////////////////////////////////////////////////////////////////////
  2. //////////////////////////Dynamic Teleport System///////////////////////////////
  3. //////////////////////////////////By Tony///////////////////////////////////////
  4. //////////////////////////////Created: 16.1.2016////////////////////////////////
  5. /////////////////////////Please don't remove credits////////////////////////////
  6. ////////////////////////////////////////////////////////////////////////////////
  7.  
  8. #include <a_samp>
  9. #include <zcmd>
  10. #include <sscanf2>
  11. #include <YSI\y_ini>
  12. #include <FileManager>
  13.  
  14.  
  15. #define DIALOG_TEDIT 32000
  16. #define DIALOG_CATEGORY 32001
  17. #define DIALOG_CLOCATION 32002
  18. #define DIALOG_DELETECAT 32003
  19. #define DIALOG_DELETELOC 32004
  20. #define DIALOG_CORDLOCATION 32005
  21. #define DIALOG_TELE 32006
  22. #define DIALOG_CTELE 32007
  23. #define DIALOG_MOVELOC 32008
  24. #define DIALOG_MOVECAT 32009
  25. #define TELE_PATH "/Locations/%s/%d.ini"
  26.  
  27.  
  28. #define MAX_TELE 100
  29. //Teleport
  30. enum tInfo
  31. {
  32. Name[90],
  33. Float:teX,
  34. Float:teY,
  35. Float:teZ,
  36. Float:teA
  37. }
  38. new TeleInfo[20][MAX_TELE][tInfo];
  39. new Category[20][90];
  40. new NameCat[MAX_PLAYERS][90];
  41. new IDCate=-1;
  42. new IDLoc=-1;
  43. new Cate=-1;
  44.  
  45.  
  46. stock udb_hash(buf[])
  47. {
  48. new length=strlen(buf);
  49. new s1 = 1;
  50. new s2 = 0;
  51. new n;
  52. for (n=0; n<length; n++)
  53. {
  54. s1 = (s1 + buf[n]) % 65521;
  55. s2 = (s2 + s1) % 65521;
  56. }
  57. return (s2 << 16) + s1;
  58. }
  59.  
  60. stock TelePath(id,katid)
  61. {
  62. new string[128];
  63. format(string,sizeof(string),TELE_PATH,Category[katid],id);
  64. return string;
  65. }
  66.  
  67. stock SaveLocations2(id,katid)
  68. {
  69. new INI:File = INI_Open(TelePath(id-1,katid));
  70. INI_WriteString(File,"Name",TeleInfo[katid][id][Name]);
  71. INI_WriteFloat(File,"X",TeleInfo[katid][id][teX]);
  72. INI_WriteFloat(File,"Y",TeleInfo[katid][id][teY]);
  73. INI_WriteFloat(File,"Z",TeleInfo[katid][id][teZ]);
  74. INI_WriteFloat(File,"A",TeleInfo[katid][id][teA]);
  75. INI_Close(File);
  76. TeleInfo[katid][id][teX]=0;
  77. TeleInfo[katid][id][teY]=0;
  78. TeleInfo[katid][id][teZ]=0;
  79. TeleInfo[katid][id][teA]=0;
  80. return 1;
  81. }
  82.  
  83. stock SaveLocations(id,katid)
  84. {
  85. new INI:File = INI_Open(TelePath(id,katid));
  86. INI_WriteString(File,"Name",TeleInfo[katid][id][Name]);
  87. INI_WriteFloat(File,"X",TeleInfo[katid][id][teX]);
  88. INI_WriteFloat(File,"Y",TeleInfo[katid][id][teY]);
  89. INI_WriteFloat(File,"Z",TeleInfo[katid][id][teZ]);
  90. INI_WriteFloat(File,"A",TeleInfo[katid][id][teA]);
  91. INI_Close(File);
  92. return 1;
  93. }
  94.  
  95. stock SaveCategory()
  96. {
  97. new INI:File = INI_Open("Locations/Categorys.ini");
  98. for(new i=0;i<20;i++)
  99. {
  100. new string[90];
  101. format(string,sizeof(string),"Category_%d",i);
  102. INI_WriteString(File,string,Category[i]);
  103. }
  104. INI_Close(File);
  105. return 1;
  106. }
  107.  
  108. stock SaveCategory2(id)
  109. {
  110. new INI:File = INI_Open("Locations/Categorys.ini");
  111. for(new i=id+1;i<20;i++)
  112. {
  113. new string[90];
  114. format(string,sizeof(string),"Category_%d",i-1);
  115. INI_WriteString(File,string,Category[i]);
  116. }
  117. INI_Close(File);
  118. return 1;
  119. }
  120.  
  121. forward LoadCategorys(id,name[],value[]);
  122. public LoadCategorys(id,name[],value[])
  123. {
  124. new string[90];
  125. format(string,sizeof(string),"Category_%d",id);
  126. INI_String(string,Category[id],90);
  127. return 1;
  128. }
  129.  
  130.  
  131. forward LoadLocations(id,name[],value[]);
  132. public LoadLocations(id,name[],value[])
  133. {
  134. INI_String("Name",TeleInfo[IDCate][id][Name],90);
  135. INI_Float("X",TeleInfo[IDCate][id][teX]);
  136. INI_Float("Y",TeleInfo[IDCate][id][teY]);
  137. INI_Float("Z",TeleInfo[IDCate][id][teZ]);
  138. INI_Float("A",TeleInfo[IDCate][id][teA]);
  139. return 1;
  140. }
  141.  
  142. forward Port(playerid);
  143. public Port(playerid)
  144. {
  145. TogglePlayerControllable(playerid,0);
  146. SetTimerEx("Unfreeze", 2000,false,"i",playerid);
  147. return 1;
  148. }
  149.  
  150. forward Unfreeze(playerid);
  151. public Unfreeze(playerid)
  152. {
  153. TogglePlayerControllable(playerid, 1);
  154. return 1;
  155. }
  156.  
  157. public OnFilterScriptExit()
  158. {
  159. for(new i=0;i<MAX_TELE;i++)
  160. {
  161. for(new a=0;a<20;a++)
  162. {
  163. if(TeleInfo[a][i][teX] != 0 && TeleInfo[a][i][teY] != 0)
  164. {
  165. SaveLocations(i,a);
  166. }
  167. }
  168. }
  169. return 1;
  170. }
  171.  
  172. public OnFilterScriptInit()
  173. {
  174. print("////////////////////////////////////////////////////////////////////////////////");
  175. print("//////////////////////////Dynamic Teleport System///////////////////////////////");
  176. print("//////////////////////////////////By Tony///////////////////////////////////////");
  177. print("//////////////////////////////Created: 16.1.2016////////////////////////////////");
  178. print("/////////////////////////Please don't remove credits////////////////////////////");
  179. print("////////////////////////////////////////////////////////////////////////////////");
  180. for(new j=0;j<20;j++)
  181. {
  182. strmid(Category[j],"Empty",0,strlen("Empty"),255);
  183. INI_ParseFile("Locations/Categorys.ini", "LoadCategorys", .bExtra = true, .extra = j);
  184. for(new i = 0; i < sizeof(TeleInfo); i++)
  185. {
  186. strmid(TeleInfo[j][i][Name],"a",0,strlen("a"),255);
  187. new str[128];
  188. format(str,sizeof(str),"Locations/%s/%d.ini",Category[j],i);
  189. if(fexist(str))
  190. {
  191. IDCate=j;
  192. INI_ParseFile(str, "LoadLocations", .bExtra = true, .extra = i);
  193. }
  194. }
  195. }
  196. return 1;
  197. }
  198.  
  199. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  200. {
  201. if(dialogid == DIALOG_CATEGORY)
  202. {
  203. new name[90];
  204. if(!response) return 1;
  205. if(sscanf(inputtext,"s[90]",name)) return ShowPlayerDialog(playerid, DIALOG_CATEGORY, DIALOG_STYLE_INPUT, "Name", "Enter the name of category", "Okay", "Cancel");
  206. for(new i=0;i<20;i++)
  207. {
  208. if(udb_hash(Category[i]) != udb_hash(name))
  209. {
  210. if(udb_hash(Category[i]) == udb_hash("Empty"))
  211. {
  212. new str[128];
  213. format(str,sizeof(str),"scriptfiles/Locations/%s",name);
  214. if(dir_create(str))
  215. {
  216. strmid(Category[i],name,0,strlen(name),255);
  217. SendClientMessage(playerid,-1,"{FF9900}[Info] {FFFFFF}Successfully added category!");
  218. }
  219. else
  220. {
  221. SendClientMessage(playerid,-1,"{FF9900}[Info] {FFFFFF}Unsuccessfully added category!");
  222. }
  223. SaveCategory();
  224. break;
  225. }
  226. }else return SendClientMessage(playerid, -1, "{ff0000}[ERROR] {FFFFFF}Category with that name already exists!");
  227. }
  228. }
  229. if(dialogid == DIALOG_CLOCATION)
  230. {
  231. new name[90],check=0;
  232. if(!response) return 1;
  233. if(sscanf(inputtext,"s[90]",name)) return ShowPlayerDialog(playerid, DIALOG_CLOCATION, DIALOG_STYLE_INPUT, "Enter the name of category", "Enter the name of the category under which you want to put a new location!", "Okay", "Cancel");
  234. for(new i=0;i<20;i++)
  235. {
  236. if(udb_hash(Category[i]) == udb_hash(name))
  237. {
  238. strmid(NameCat[playerid],Category[i],0,strlen(Category[i]),255);
  239. ShowPlayerDialog(playerid, DIALOG_CORDLOCATION, DIALOG_STYLE_INPUT, "Enter the name", "Enter the name of location!", "Okay", "Cancel");
  240. check=1;
  241. break;
  242. }
  243. }
  244. if(check==0) return ShowPlayerDialog(playerid, DIALOG_CLOCATION, DIALOG_STYLE_INPUT, "Enter the name of category", "Enter the name of the category under which you want to put a new location!", "Okay", "Cancel");
  245. }
  246. if(dialogid == DIALOG_CORDLOCATION)
  247. {
  248. new name[90],j=-1;
  249. if(!response) return 1;
  250. if(sscanf(inputtext,"s[90]",name)) return ShowPlayerDialog(playerid, DIALOG_CORDLOCATION, DIALOG_STYLE_INPUT, "Enter the name", "Enter the name of location!", "Okay", "Cancel");
  251. for(new i=0;i<sizeof(TeleInfo);i++)
  252. {
  253. for(new e=0;e<20;e++)
  254. {
  255. if(udb_hash(Category[e]) == udb_hash(NameCat[playerid]))
  256. {
  257. j=e;
  258. }
  259. }
  260. if(!fexist(TelePath(i,j)))
  261. {
  262. new Float:Poz[4];
  263. GetPlayerPos(playerid,Poz[0],Poz[1],Poz[2]);
  264. GetPlayerFacingAngle(playerid,Poz[3]);
  265. strmid(TeleInfo[j][i][Name],name,0,strlen(name),255);
  266. TeleInfo[j][i][teX]=Poz[0];
  267. TeleInfo[j][i][teY]=Poz[1];
  268. TeleInfo[j][i][teZ]=Poz[2];
  269. TeleInfo[j][i][teA]=Poz[3];
  270. SaveLocations(i,j);
  271. SendClientMessage(playerid,-1,"{FF9900}[Info] {FFFFFF}Successfully added location!");
  272. break;
  273. }
  274. }
  275. }
  276. if(dialogid == DIALOG_DELETECAT)
  277. {
  278. new name[90];
  279. if(!response) return 1;
  280. if(sscanf(inputtext,"s[90]",name)) return ShowPlayerDialog(playerid, DIALOG_DELETECAT, DIALOG_STYLE_INPUT, "Name", "Enter name of category to delete", "Okay", "Cancel");
  281. for(new i=0;i<20;i++)
  282. {
  283. if(udb_hash(Category[i]) == udb_hash(name) && udb_hash(Category[i]) != udb_hash("Empty"))
  284. {
  285. new str[128];
  286. format(str,sizeof(str),"scriptfiles/Locations/%s",name);
  287. for(new j=0;j<sizeof(TeleInfo);j++)
  288. {
  289. new str2[128];
  290. format(str2,sizeof(str2),"Locations/%s/%d.ini",Category[i],j);
  291. if(fexist(str2))
  292. {
  293. TeleInfo[i][j][teX] = 0;
  294. TeleInfo[i][j][teY] = 0;
  295. TeleInfo[i][j][teZ] = 0;
  296. TeleInfo[i][j][teA] = 0;
  297. strmid(TeleInfo[i][j][Name],"a",0,strlen("a"),255);
  298. fremove(str2);
  299. }
  300. }
  301. if(dir_delete(str))
  302. {
  303. strmid(Category[i],"Empty",0,strlen("Empty"),255);
  304. SaveCategory2(i);
  305. SendClientMessage(playerid,-1,"{FF9900}[Info] {FFFFFF}Category is deleted!");
  306. for(new j=0;j<20;j++)
  307. {
  308. strmid(Category[j],"Empty",0,strlen("Empty"),255);
  309. INI_ParseFile("Locations/Categorys.ini", "LoadCategorys", .bExtra = true, .extra = j);
  310. for(new eh = 0; eh < sizeof(TeleInfo); eh++)
  311. {
  312. new str3[128];
  313. format(str3,sizeof(str3),"Locations/%s/%d.ini",Category[j],eh);
  314. if(fexist(str3))
  315. {
  316. TeleInfo[j][eh][teX] = 0;
  317. TeleInfo[j][eh][teY] = 0;
  318. TeleInfo[j][eh][teZ] = 0;
  319. TeleInfo[j][eh][teA] = 0;
  320. strmid(TeleInfo[j][eh][Name],"a",0,strlen("a"),255);
  321. IDCate=j;
  322. INI_ParseFile(str3, "LoadLocations", .bExtra = true, .extra = eh);
  323. }
  324. }
  325. }
  326. }
  327. else
  328. {
  329. SendClientMessage(playerid,-1,"{ff0000}[ERROR] {FFFFFF}Folder does not exist!");
  330. }
  331. break;
  332. }
  333. }
  334. }
  335. if(dialogid == DIALOG_DELETELOC)
  336. {
  337. new name[90],check=0;
  338. if(!response) return 1;
  339. if(sscanf(inputtext,"s[90]",name)) return ShowPlayerDialog(playerid, DIALOG_DELETELOC, DIALOG_STYLE_INPUT, "Enter the name", "Enter the name of location!", "Okay", "Cancel");
  340. for(new i=0;i<sizeof(TeleInfo);i++)
  341. {
  342. for(new a=0;a<20;a++)
  343. {
  344. if(udb_hash(TeleInfo[a][i][Name]) == udb_hash(name))
  345. {
  346. TeleInfo[a][i][teX] = 0;
  347. TeleInfo[a][i][teY] = 0;
  348. TeleInfo[a][i][teZ] = 0;
  349. TeleInfo[a][i][teA] = 0;
  350. strmid(TeleInfo[a][i][Name],"a",0,strlen("a"),255);
  351. fremove(TelePath(i,a));
  352. check=1;
  353. new id=i;
  354. for(new j=id+1;j<sizeof(TeleInfo);j++)
  355. {
  356. new str[128];
  357. format(str,sizeof(str),"Locations/%s/%d.ini",Category[a],j);
  358. if(fexist(str))
  359. {
  360. fremove(str);
  361. SaveLocations2(j,a);
  362. }
  363. }
  364. for(new k=0;k<sizeof(TeleInfo);k++)
  365. {
  366. new str[128];
  367. format(str,sizeof(str),"Locations/%s/%d.ini",Category[a],k);
  368. strmid(TeleInfo[a][k][Name],"a",0,strlen("a"),255);
  369. IDCate=a;
  370. INI_ParseFile(str, "LoadLocations", .bExtra = true, .extra = k);
  371. }
  372. }
  373. }
  374. }
  375. if(check==0) return ShowPlayerDialog(playerid, DIALOG_DELETELOC, DIALOG_STYLE_INPUT, "Wrong name", "Enter the name of location!", "Okay", "Cancel");
  376. SendClientMessage(playerid,-1,"{FF9900}[Info] {FFFFFF}Successfully deleted location!");
  377. }
  378. if(dialogid == DIALOG_MOVELOC)
  379. {
  380. new name[90],check=0;
  381. if(!response) return 1;
  382. if(sscanf(inputtext,"s[90]",name)) return ShowPlayerDialog(playerid, DIALOG_MOVELOC, DIALOG_STYLE_INPUT, "Name", "Enter the name of location which you want move", "Okay", "Cancel");
  383. for(new a=0;a<20;a++)
  384. {
  385. for(new i=0;i<sizeof(TeleInfo);i++)
  386. {
  387. if(udb_hash(TeleInfo[a][i][Name]) == udb_hash(name) && udb_hash(TeleInfo[a][i][Name]) != udb_hash("a"))
  388. {
  389. IDCate=a;
  390. IDLoc=i;
  391. ShowPlayerDialog(playerid, DIALOG_MOVECAT, DIALOG_STYLE_INPUT, "Name", "Enter the name of category where you want to move selected location", "Okay", "Cancel");
  392. check=1;
  393. break;
  394. }
  395. }
  396. }
  397. if(check==0) return ShowPlayerDialog(playerid, DIALOG_MOVELOC, DIALOG_STYLE_INPUT, "Wrong Name", "Enter the name of location which you want move", "Okay", "Cancel");
  398. }
  399.  
  400. if(dialogid == DIALOG_MOVECAT)
  401. {
  402. new name[90],check=0;
  403. if(!response) return 1;
  404. if(sscanf(inputtext,"s[90]",name)) return ShowPlayerDialog(playerid, DIALOG_MOVECAT, DIALOG_STYLE_INPUT, "Name", "Enter the name of category where you want to move selected location", "Okay", "Cancel");
  405. for(new e=0;e<20;e++)
  406. {
  407. if(udb_hash(Category[e]) == udb_hash(name))
  408. {
  409. for(new j=0;j<sizeof(TeleInfo);j++)
  410. {
  411. new str[128];
  412. format(str,sizeof(str),"Locations/%s/%d.ini",Category[e],j);
  413. if(!fexist(str))
  414. {
  415. strmid(TeleInfo[e][j][Name],TeleInfo[IDCate][IDLoc][Name],0,strlen(TeleInfo[IDCate][IDLoc][Name]),255);
  416. TeleInfo[e][j][teX]=TeleInfo[IDCate][IDLoc][teX];
  417. TeleInfo[e][j][teY]=TeleInfo[IDCate][IDLoc][teY];
  418. TeleInfo[e][j][teZ]=TeleInfo[IDCate][IDLoc][teZ];
  419. TeleInfo[e][j][teA]=TeleInfo[IDCate][IDLoc][teA];
  420. SaveLocations(j,e);
  421. check=1;
  422. break;
  423. }
  424. }
  425. }
  426. }
  427. TeleInfo[IDCate][IDLoc][teX] = 0;
  428. TeleInfo[IDCate][IDLoc][teY] = 0;
  429. TeleInfo[IDCate][IDLoc][teZ] = 0;
  430. TeleInfo[IDCate][IDLoc][teA] = 0;
  431. strmid(TeleInfo[IDCate][IDLoc][Name],"a",0,strlen("a"),255);
  432. fremove(TelePath(IDLoc,IDCate));
  433. new id=IDLoc;
  434. for(new j=id+1;j<sizeof(TeleInfo);j++)
  435. {
  436. new str[128];
  437. format(str,sizeof(str),"Locations/%s/%d.ini",Category[IDCate],j);
  438. if(fexist(str))
  439. {
  440. fremove(str);
  441. SaveLocations2(j,IDCate);
  442. }
  443. }
  444. for(new k=0;k<sizeof(TeleInfo);k++)
  445. {
  446. new str[128];
  447. format(str,sizeof(str),"Locations/%s/%d.ini",Category[IDCate],k);
  448. strmid(TeleInfo[IDCate][k][Name],"a",0,strlen("a"),255);
  449. INI_ParseFile(str, "LoadLocations", .bExtra = true, .extra = k);
  450. }
  451. if(check==0) return ShowPlayerDialog(playerid, DIALOG_MOVECAT, DIALOG_STYLE_INPUT, "Wrong Name", "Enter the name of category where you want to move selected location", "Okay", "Cancel");
  452. SendClientMessage(playerid,-1,"{FF9900}[Info] {FFFFFF}Successfully moved location!");
  453. }
  454. if(dialogid == DIALOG_TEDIT)
  455. {
  456. if(response)
  457. {
  458. if(listitem == 0)
  459. {
  460. ShowPlayerDialog(playerid, DIALOG_CATEGORY, DIALOG_STYLE_INPUT, "Name", "Enter the name of category", "Okay", "Cancel");
  461. }
  462. if(listitem == 1)
  463. {
  464. SendClientMessage(playerid,-1,"{FF9900}[Info] {FFFFFF}Location will save on your current coordinates!");
  465. ShowPlayerDialog(playerid, DIALOG_CLOCATION, DIALOG_STYLE_INPUT, "Name of category", "Enter the name of category where you want to put location!", "Okay", "Cancel");
  466. }
  467. if(listitem == 2)
  468. {
  469. ShowPlayerDialog(playerid, DIALOG_DELETECAT, DIALOG_STYLE_INPUT, "Name", "Enter name of category to delete", "Okay", "Cancel");
  470. }
  471. if(listitem == 3)
  472. {
  473. ShowPlayerDialog(playerid, DIALOG_DELETELOC, DIALOG_STYLE_INPUT, "Name", "Enter the name of location", "Okay", "Cancel");
  474. }
  475. if(listitem == 4)
  476. {
  477. ShowPlayerDialog(playerid, DIALOG_MOVELOC, DIALOG_STYLE_INPUT, "Name", "Enter the name of location which you want to move", "Okay", "Cancel");
  478. }
  479. }
  480. }
  481. if(dialogid == DIALOG_TELE)
  482. {
  483. if(response)
  484. {
  485. new id=listitem;
  486. if(IsPlayerInAnyVehicle(playerid))
  487. {
  488. SetVehiclePos(GetPlayerVehicleID(playerid), TeleInfo[Cate][id][teX],TeleInfo[Cate][id][teY],TeleInfo[Cate][id][teZ]);
  489. SetVehicleZAngle(GetPlayerVehicleID(playerid),TeleInfo[Cate][id][teA]);
  490. PutPlayerInVehicle(playerid, GetPlayerVehicleID(playerid), 0);
  491. }
  492. else
  493. {
  494. SetPlayerPos(playerid,TeleInfo[Cate][id][teX],TeleInfo[Cate][id][teY],TeleInfo[Cate][id][teZ]);
  495. SetPlayerFacingAngle(playerid, TeleInfo[Cate][id][teA]);
  496. }
  497. Port(playerid);
  498. new str[128];
  499. format(str,sizeof(str),"{FF9900}You are teleported to {FFFFFF}%s!",TeleInfo[Cate][id][Name]);
  500. SendClientMessage(playerid,-1,str);
  501. }
  502. }
  503. if(dialogid == DIALOG_CTELE)
  504. {
  505. if(response)
  506. {
  507. Cate=listitem;
  508. new info[2100];
  509. for(new i=0;i<MAX_TELE;i++)
  510. {
  511. if(TeleInfo[Cate][i][teX] != 0 && TeleInfo[Cate][i][teY] != 0)
  512. {
  513. new str[128];
  514. format(str,sizeof(str),"%s\n",TeleInfo[Cate][i][Name]);
  515. strcat(info, str, sizeof(info));
  516. }
  517. }
  518. ShowPlayerDialog(playerid, DIALOG_TELE, DIALOG_STYLE_LIST, "Teleport", info, "Okay", "Cancel");
  519. }
  520. }
  521. return 1;
  522. }
  523.  
  524. CMD:edittele(playerid,params[])
  525. {
  526. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"[#Sikora] Just rcon admin!");
  527. if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,-1,"[#Sikora] You may not be in the vehicle!");
  528. ShowPlayerDialog(playerid, DIALOG_TEDIT, DIALOG_STYLE_LIST, "Edit", "Add category\nAdd location\nDelete category\nDelete location\nMove location", "Okay", "Cancel");
  529. return 1;
  530. }
  531.  
  532. CMD:tele(playerid, params[])
  533. {
  534. if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid,-1,"You are not connected!");
  535. new info[1024];
  536. for(new i=0;i<20;i++)
  537. {
  538. if(udb_hash(Category[i]) != udb_hash("Empty"))
  539. {
  540. new str[128];
  541. format(str,sizeof(str),"%s\n",Category[i]);
  542. strcat(info, str, sizeof(info));
  543. }
  544. }
  545. ShowPlayerDialog(playerid, DIALOG_CTELE, DIALOG_STYLE_LIST, "Teleport", info, "Next", "Cancel");
  546. return 1;
  547. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement