Advertisement
Guest User

dialogs.inc

a guest
May 4th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.38 KB | None | 0 0
  1. #if defined _dialogs_included
  2. #endinput
  3. #endif
  4. #define _dialogs_included
  5.  
  6. /*
  7. * dialogs.inc
  8. * Version: v2.7.3 (last updated: 13 August, 2016)
  9. * By Gammix
  10. *
  11. * Functions:
  12. native ShowPlayerPreviewModelDialog(playerid, dialogid, style, caption[], models[], labels[][], button1[], button2[], limit = sizeof (models));
  13. native Dialog_SetModelRot(playerid, listitem, Float:x = 0.0, Float:y = 0.0, Float:z = 0.0, Float:zoom = 1.0, color1 = -1, color2 = -1);
  14. *
  15. */
  16.  
  17. enum
  18. {
  19. DIALOG_STYLE_PREVMODEL = 6,
  20. DIALOG_STYLE_PREVMODEL_LIST
  21. };
  22.  
  23. #define DIALOG_MAX_TEXT_DRAWS (100)
  24.  
  25. #define DIALOG_MAX_LISTITEM_SIZE (150)
  26.  
  27. #define Dialog_CountPages(%0,%1) \
  28. (((%0) - 1) / (%1) + 1)
  29.  
  30. #define Dialog_SetOpacity(%0,%1) \
  31. ((%0 & ~0xFF) | clamp(%1, 0x00, 0xFF))
  32.  
  33. static PlayerText:p_DialogTextDraw[MAX_PLAYERS][DIALOG_MAX_TEXT_DRAWS];
  34. static p_DialogTextDrawPool[MAX_PLAYERS];
  35.  
  36. enum E_PLAYER_DIALOG
  37. {
  38. E_PLAYER_DIALOG_ID,
  39. E_PLAYER_DIALOG_STYLE,
  40. bool: E_PLAYER_DIALOG_DUAL_BTN,
  41. E_PLAYER_DIALOG_LISTITEMS,
  42. E_PLAYER_DIALOG_LISTITEM_ID,
  43. E_PLAYER_DIALOG_PAGE,
  44. E_PLAYER_DIALOG_CLICK_TICKCOUNT,
  45. bool: E_PLAYER_DIALOG_CANCELED
  46. };
  47. static p_Dialog[MAX_PLAYERS][E_PLAYER_DIALOG];
  48.  
  49. enum E_DIALOG_COMPONENT
  50. {
  51. E_DIALOG_COMPONENT_SCROLL_UP,
  52. E_DIALOG_COMPONENT_SCROLL_DOWN,
  53. E_DIALOG_COMPONENT_BUTTON1,
  54. E_DIALOG_COMPONENT_BUTTON2,
  55. E_DIALOG_COMPONENT_BUTTONC,
  56. E_DIALOG_COMPONENT_MODEL[24],
  57. E_DIALOG_COMPONENT_LABEL[24],
  58. E_DIALOG_COMPONENT_BAR[24],
  59. E_DIALOG_COMPONENT_SCROLL
  60. };
  61. static p_DialogCompnent[MAX_PLAYERS][E_DIALOG_COMPONENT];
  62.  
  63. static Dialog_Create(playerid, Float:posX, Float:posY, string[], bgcolor, font, Float:lettersizeX, Float:lettersizeY, textcolor, allign = 0, outline = 1, proportional = 1, shadow = 1, usebox = 0, boxcolor = 0, Float:textsizeX = -1.0, Float:textsizeY = -1.0, model = 0, Float:rotX = 0.0, Float:rotY = 0.0, Float:rotZ = 0.0, Float:zoom = 1.0, selectable = 0, show = 0)
  64. {
  65. p_DialogTextDraw[playerid][p_DialogTextDrawPool[playerid]] = CreatePlayerTextDraw(playerid, posX, posY, string);
  66.  
  67. PlayerTextDrawBackgroundColor(playerid, p_DialogTextDraw[playerid][p_DialogTextDrawPool[playerid]], bgcolor);
  68. PlayerTextDrawFont(playerid, p_DialogTextDraw[playerid][p_DialogTextDrawPool[playerid]], font);
  69. PlayerTextDrawLetterSize(playerid, p_DialogTextDraw[playerid][p_DialogTextDrawPool[playerid]], lettersizeX, lettersizeY);
  70. PlayerTextDrawColor(playerid, p_DialogTextDraw[playerid][p_DialogTextDrawPool[playerid]], textcolor);
  71. PlayerTextDrawAlignment(playerid, p_DialogTextDraw[playerid][p_DialogTextDrawPool[playerid]], allign);
  72. PlayerTextDrawSetOutline(playerid, p_DialogTextDraw[playerid][p_DialogTextDrawPool[playerid]], outline);
  73. PlayerTextDrawSetProportional(playerid, p_DialogTextDraw[playerid][p_DialogTextDrawPool[playerid]], proportional);
  74. PlayerTextDrawSetShadow(playerid, p_DialogTextDraw[playerid][p_DialogTextDrawPool[playerid]], shadow);
  75. PlayerTextDrawUseBox(playerid, p_DialogTextDraw[playerid][p_DialogTextDrawPool[playerid]], usebox);
  76. PlayerTextDrawSetSelectable(playerid, p_DialogTextDraw[playerid][p_DialogTextDrawPool[playerid]], selectable);
  77.  
  78. if (usebox)
  79. PlayerTextDrawBoxColor(playerid, p_DialogTextDraw[playerid][p_DialogTextDrawPool[playerid]], boxcolor);
  80.  
  81. if (textsizeX != -1.0 || textsizeY != -1.0)
  82. PlayerTextDrawTextSize(playerid, p_DialogTextDraw[playerid][p_DialogTextDrawPool[playerid]], textsizeX, textsizeY);
  83.  
  84. if(font == 5)
  85. {
  86. PlayerTextDrawSetPreviewModel(playerid, p_DialogTextDraw[playerid][p_DialogTextDrawPool[playerid]], model);
  87. PlayerTextDrawSetPreviewRot(playerid, p_DialogTextDraw[playerid][p_DialogTextDrawPool[playerid]], rotX, rotY, rotZ, zoom);
  88. }
  89.  
  90. if (show)
  91. PlayerTextDrawShow(playerid, p_DialogTextDraw[playerid][p_DialogTextDrawPool[playerid]]);
  92.  
  93. return p_DialogTextDrawPool[playerid]++;
  94. }
  95.  
  96. static Dialog_Init(playerid, style, caption[], button1[], button2[])
  97. {
  98. for (new i; i < DIALOG_MAX_TEXT_DRAWS; i++)
  99. p_DialogTextDraw[playerid][i] = PlayerText:INVALID_TEXT_DRAW;
  100.  
  101. Dialog_Create(playerid, 173.000000, 122.000000, "_", 50, 1, 0.000000, 0.599999, -1, 0, 0, 1, 1, 1, 200, 462.000000, 19.000000, .show = 1);
  102. Dialog_Create(playerid, 173.000000, 121.000000, caption, 50, 1, 0.129998, 0.799998, -36, 0, 0, 1, 1, 0, .show = 1);
  103.  
  104. Dialog_Create(playerid, 173.000000, 131.000000, "_", 50, 1, 0.000000, 21.599998, -1, 0, 0, 1, 1, 1, 150, 462.000000, 19.000000, .show = 1);
  105. Dialog_Create(playerid, 177.000000, 135.000000, "_", 50, 1, 0.000000, 18.299997, -1, 0, 0, 1, 1, 1, 100, 458.000000, 19.000000, .show = 1);
  106. Dialog_Create(playerid, 177.000000, 134.000000, "_", 50, 1, 0.000000, 18.499998, -1, 0, 0, 1, 1, 1, -106, 173.000000, 19.000000, .show = 1);
  107. Dialog_Create(playerid, 454.000000, 135.000000, "_", 50, 1, 0.000000, 18.299997, -1, 0, 0, 1, 1, 1, -106, 452.000000, 19.000000, .show = 1);
  108. Dialog_Create(playerid, 461.000000, 135.000000, "_", 50, 1, 0.000000, 18.299997, -1, 0, 0, 1, 1, 1, -106, 459.000000, 19.000000, .show = 1);
  109. Dialog_Create(playerid, 462.000000, 134.000000, "_", 50, 1, 0.000000, -0.300001, -1, 0, 0, 1, 1, 1, -106, 174.000000, 19.000000, .show = 1);
  110. Dialog_Create(playerid, 462.000000, 304.250000, "_", 50, 1, 0.000000, -0.400001, -1, 0, 0, 1, 1, 1, -106, 173.000000, 19.000000, .show = 1);
  111.  
  112. p_DialogCompnent[playerid][E_DIALOG_COMPONENT_SCROLL_UP] = Dialog_Create(playerid, 453.000000, 133.000000, "LD_POOL:ball", 50, 4, 0.500000, 1.000000, -106, 0, 0, 1, 1, 1, 255, 7.000000, 9.00000, .selectable = 1, .show = 1);
  113. Dialog_Create(playerid, 454.000000, 134.000000, "LD_BEAT:up", 255, 4, 0.500000, 1.000000, 255, 0, 0, 1, 1, 1, 255, 5.000000, 6.000000, .show = 1);
  114.  
  115. p_DialogCompnent[playerid][E_DIALOG_COMPONENT_SCROLL_DOWN] = Dialog_Create(playerid, 453.000000, 293.000000, "LD_POOL:ball", 50, 4, 0.500000, 1.000000, -106, 0, 0, 1, 1, 1, 255, 7.000000, 9.00000, .selectable = 1, .show = 1);
  116. Dialog_Create(playerid, 454.000000, 295.000000, "LD_BEAT:down", 255, 4, 0.500000, 1.000000, 255, 0, 0, 1, 1, 1, 255, 5.000000, 6.000000, .show = 1);
  117.  
  118. if (button2[0])
  119. {
  120. Dialog_Create(playerid, 302.000000, 310.000000, "_", 50, 1, 0.000000, -0.400001, -1, 0, 0, 1, 1, 1, -106, 253.000000, 19.000000, .show = 1);
  121. Dialog_Create(playerid, 302.000000, 324.000000, "_", 50, 1, 0.000000, -0.400001, -1, 0, 0, 1, 1, 1, -106, 253.000000, 19.000000, .show = 1);
  122. Dialog_Create(playerid, 253.000000, 304.000000, "(", 0, 1, 0.200000, 2.000000, -106, 0, 0, 1, 1, .show = 1);
  123. Dialog_Create(playerid, 299.000000, 304.000000, ")", 0, 1, 0.200000, 2.000000, -106, 0, 0, 1, 1, .show = 1);
  124. p_DialogCompnent[playerid][E_DIALOG_COMPONENT_BUTTON1] = Dialog_Create(playerid, 254.000000, 309.000000, "ld_plan:tvbase", 50, 4, 0.000000, 0.899998, 255, 0, 0, 1, 1, 1, 255, 46.000000, 13.000000, .selectable = 1, .show = 1);
  125. Dialog_Create(playerid, 278.000000, 311.000000, button1, 50, 1, 0.129998, 0.799998, -36, 2, 0, 1, 1, 0, .show = 1);
  126. if (!button1[0])
  127. Dialog_Create(playerid, 278.000000, 311.000000, "button1", 50, 1, 0.129998, 0.799998, -36, 2, 0, 1, 1, 0, .show = 1);
  128. else
  129. Dialog_Create(playerid, 278.000000, 311.000000, button1, 50, 1, 0.129998, 0.799998, -36, 2, 0, 1, 1, 0, .show = 1);
  130.  
  131. Dialog_Create(playerid, 372.000000, 310.000000, "_", 50, 1, 0.000000, -0.400001, -1, 0, 0, 1, 1, 1, -106, 323.000000, 19.000000, .show = 1);
  132. Dialog_Create(playerid, 372.000000, 324.000000, "_", 50, 1, 0.000000, -0.400001, -1, 0, 0, 1, 1, 1, -106, 323.000000, 19.000000, .show = 1);
  133. Dialog_Create(playerid, 322.000000, 304.000000, "(", 0, 1, 0.200000, 2.000000, -106, 0, 0, 1, 1, .show = 1);
  134. Dialog_Create(playerid, 369.000000, 304.000000, ")", 0, 1, 0.230000, 1.999999, -106, 0, 0, 1, 1, .show = 1);
  135. p_DialogCompnent[playerid][E_DIALOG_COMPONENT_BUTTON2] = Dialog_Create(playerid, 324.000000, 309.000000, "ld_plan:tvbase", 50, 4, 0.000000, 0.899998, 255, 0, 0, 1, 1, 1, 255, 46.000000, 13.000000, .selectable = 1, .show = 1);
  136. Dialog_Create(playerid, 348.000000, 311.000000, button2, 50, 1, 0.140000, 0.899999, -36, 2, 0, 1, 1, 0, .show = 1);
  137. }
  138. else
  139. {
  140. Dialog_Create(playerid, 342.000000, 310.000000, "_", 50, 1, 0.000000, -0.400001, -1, 0, 0, 1, 1, 1, -106, 293.000000, 19.000000, .show = 1);
  141. Dialog_Create(playerid, 342.000000, 324.000000, "_", 50, 1, 0.000000, -0.400001, -1, 0, 0, 1, 1, 1, -106, 293.000000, 19.000000, .show = 1);
  142. Dialog_Create(playerid, 293.000000, 304.000000, "(", 0, 1, 0.200000, 2.000000, -106, 0, 0, 1, 1, .show = 1);
  143. Dialog_Create(playerid, 339.000000, 304.000000, ")", 0, 1, 0.219999, 2.000000, -106, 0, 0, 1, 1, .show = 1);
  144. p_DialogCompnent[playerid][E_DIALOG_COMPONENT_BUTTONC] = Dialog_Create(playerid, 294.000000, 309.000000, "ld_plan:tvbase", 50, 4, 0.000000, 0.899998, 255, 0, 0, 1, 1, 1, 255, 46.000000, 13.000000, .selectable = 1, .show = 1);
  145. if (!button1[0])
  146. Dialog_Create(playerid, 317.000000, 311.000000, "button1", 50, 1, 0.140000, 0.899999, -36, 2, 0, 1, 1, 0, .show = 1);
  147. else
  148. Dialog_Create(playerid, 317.000000, 311.000000, button1, 50, 1, 0.140000, 0.899999, -36, 2, 0, 1, 1, 0, .show = 1);
  149. }
  150.  
  151. if (style == DIALOG_STYLE_PREVMODEL)
  152. {
  153. new count;
  154. new Float:base[2] = {179.000000, 134.000000};
  155.  
  156. for (new i; i < 24; i++)
  157. {
  158. p_DialogCompnent[playerid][E_DIALOG_COMPONENT_MODEL][i] = Dialog_Create(playerid, base[0], base[1], "_", Dialog_SetOpacity(0x3B3B3BFF, 200), 5, 0.129998, 0.799998, -1, 0, 0, 1, 1, 1, 0, 44.000000, 41.000000, .selectable = 1);
  159. p_DialogCompnent[playerid][E_DIALOG_COMPONENT_LABEL][i] = Dialog_Create(playerid, base[0] + 2.000000, base[1] + 1.000000, "", 255, 1, 0.140000, 0.899999, -36, 0, 0, 1, 2, 0);
  160.  
  161. base[0] += 45.000000;
  162.  
  163. count++;
  164. if (count == 6)
  165. {
  166. base[0] = 179.000000;
  167. base[1] += 42.000000;
  168.  
  169. count = 0;
  170. }
  171. }
  172. }
  173. else
  174. {
  175. for (new i; i < (5); i++)
  176. {
  177. p_DialogCompnent[playerid][E_DIALOG_COMPONENT_BAR][i] = Dialog_Create(playerid, 177.000000, (134.000000 + (33.0 * i)), "ld_plan:tvbase", 50, 4, 0.129997, 0.799997, Dialog_SetOpacity(0x788FB0FF, 200), 0, 0, 1, 1, 1, 0, 274.000000, 32.000000, .selectable = 1);
  178. p_DialogCompnent[playerid][E_DIALOG_COMPONENT_MODEL][i] = Dialog_Create(playerid, 178.000000, (134.000000 + (33.0 * i)), "_", Dialog_SetOpacity(0x3B3B3BFF, 200), 5, 0.129997, 0.799997, -1, 0, 0, 1, 1, 1, 0, 34.000000, 30.000000);
  179. p_DialogCompnent[playerid][E_DIALOG_COMPONENT_LABEL][i] = Dialog_Create(playerid, 215.000000, (135.000000 + (33.0 * i)), "", 255, 1, 0.099999, 0.599997, -36, 0, 0, 1, 2, 0);
  180. }
  181. }
  182.  
  183. p_DialogCompnent[playerid][E_DIALOG_COMPONENT_SCROLL] = Dialog_Create(playerid, 0.000000, 0.000000, "_", 0, 1, 0.0, 0.0, 0);
  184. }
  185.  
  186. static Dialog_Exit(playerid)
  187. {
  188. for (new i; i < p_DialogTextDrawPool[playerid]; i++)
  189. {
  190. PlayerTextDrawHide(playerid, p_DialogTextDraw[playerid][i]);
  191. PlayerTextDrawDestroy(playerid, p_DialogTextDraw[playerid][i]);
  192.  
  193. p_DialogTextDraw[playerid][i] = PlayerText:INVALID_TEXT_DRAW;
  194. }
  195.  
  196. p_DialogTextDrawPool[playerid] = 0;
  197. }
  198.  
  199. static Dialog_GetListitem(playerid, listitem, &model, label[], &Float:x, &Float:y, &Float:z, &Float:zoom, &color1, &color2, maxlength = sizeof (label))
  200. {
  201. static string[DIALOG_MAX_LISTITEM_SIZE];
  202. format(string, sizeof (string), "DialogListitem_%i", listitem);
  203. GetPVarString(playerid, string, string, DIALOG_MAX_LISTITEM_SIZE);
  204.  
  205. static dest[(DIALOG_MAX_LISTITEM_SIZE / 2)];
  206.  
  207. new type;
  208. new pos;
  209. for (new i; i < DIALOG_MAX_LISTITEM_SIZE; i++)
  210. {
  211. if (string[i] == '|' || i == (DIALOG_MAX_LISTITEM_SIZE - 1))
  212. {
  213. strmid(dest, string, pos, i);
  214. pos = (i + 1);
  215.  
  216. switch (type)
  217. {
  218. case 0: model = strval(dest);
  219. case 1: format(label, maxlength, dest);
  220. case 2: x = floatstr(dest);
  221. case 3: y = floatstr(dest);
  222. case 4: z = floatstr(dest);
  223. case 5: zoom = floatstr(dest);
  224. case 6: color1 = strval(dest);
  225. case 7: color2 = strval(dest);
  226. }
  227. type++;
  228. }
  229. }
  230. }
  231.  
  232. static Dialog_SetListitem(playerid, listitem, model, label[], Float:x, Float:y, Float:z, Float:zoom, color1, color2)
  233. {
  234. static string[DIALOG_MAX_LISTITEM_SIZE];
  235. format(string, DIALOG_MAX_LISTITEM_SIZE, "%i|%s|%f|%f|%f|%f|%i|%i", model, label, x, y, z, zoom, color1, color2);
  236.  
  237. static varname[45];
  238. format(varname, sizeof (varname), "DialogListitem_%i", listitem);
  239. SetPVarString(playerid, varname, string);
  240. }
  241.  
  242. static Dialog_SetPage(playerid, page)
  243. {
  244. p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEM_ID] = 0;
  245.  
  246. switch (p_Dialog[playerid][E_PLAYER_DIALOG_STYLE])
  247. {
  248. case DIALOG_STYLE_PREVMODEL:
  249. {
  250. PlayerTextDrawDestroy(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_SCROLL]]);
  251. p_DialogTextDrawPool[playerid]--;
  252.  
  253. new pages = Dialog_CountPages(p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEMS], 24);
  254. if (pages > 1)
  255. {
  256. new Float:whiles = ((145.500000 + 16.200000) / pages);
  257. p_DialogCompnent[playerid][E_DIALOG_COMPONENT_SCROLL] = Dialog_Create(playerid, 455.000000, (144.000000 + (whiles * page)), "_", 0, 1, 0.000000, (whiles / 16.200000), 0, .usebox = 1, .boxcolor = Dialog_SetOpacity(0xD15454FF, 200), .textsizeX = 458.000000, .textsizeY = 0.000000, .show = 1);
  258. }
  259.  
  260. new listitem, index, model, label[DIALOG_MAX_LISTITEM_SIZE / 2], Float:x, Float:y, Float:z, Float:zoom, color1, color2;
  261. for (new i; i < 24; i++)
  262. {
  263. listitem = ((page * 24) + i);
  264. if (listitem >= p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEMS])
  265. {
  266. PlayerTextDrawHide(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_MODEL][index]]);
  267. PlayerTextDrawHide(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_LABEL][index]]);
  268.  
  269. index++;
  270. continue;
  271. }
  272.  
  273. Dialog_GetListitem(playerid, listitem, model, label, x, y, z, zoom, color1, color2);
  274. if (model < 0 || model > 20000)
  275. continue;
  276.  
  277. PlayerTextDrawBackgroundColor(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_MODEL][index]], Dialog_SetOpacity(0x3B3B3BFF, 150));
  278. PlayerTextDrawSetPreviewModel(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_MODEL][index]], model);
  279. PlayerTextDrawSetPreviewRot(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_MODEL][index]], x, y, z, zoom);
  280. PlayerTextDrawSetPreviewVehCol(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_MODEL][index]], color1, color2);
  281. PlayerTextDrawShow(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_MODEL][index]]);
  282.  
  283. if (label[0])
  284. {
  285. PlayerTextDrawSetString(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_LABEL][index]], label);
  286. PlayerTextDrawShow(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_LABEL][index]]);
  287. }
  288.  
  289. index++;
  290. }
  291.  
  292. PlayerTextDrawBackgroundColor(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_MODEL][0]], Dialog_SetOpacity(0xFF5959FF, 150));
  293. PlayerTextDrawShow(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_MODEL][0]]);
  294. }
  295.  
  296. case DIALOG_STYLE_PREVMODEL_LIST:
  297. {
  298. PlayerTextDrawDestroy(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_SCROLL]]);
  299. p_DialogTextDrawPool[playerid]--;
  300.  
  301. new pages = Dialog_CountPages(p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEMS], 5);
  302. if (pages > 1)
  303. {
  304. new Float:whiles = ((145.500000 + 16.200000) / pages);
  305. p_DialogCompnent[playerid][E_DIALOG_COMPONENT_SCROLL] = Dialog_Create(playerid, 455.000000, (144.000000 + (whiles * page)), "_", 0, 1, 0.000000, (whiles / 16.200000), 0, .usebox = 1, .boxcolor = Dialog_SetOpacity(0xD15454FF, 200), .textsizeX = 458.000000, .textsizeY = 0.000000, .show = 1);
  306. }
  307.  
  308. new listitem, index, model, label[DIALOG_MAX_LISTITEM_SIZE / 2], Float:x, Float:y, Float:z, Float:zoom, color1, color2;
  309. for (new i; i < 5; i++)
  310. {
  311. listitem = ((page * 5) + i);
  312. if (listitem >= p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEMS])
  313. {
  314. PlayerTextDrawHide(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_BAR][index]]);
  315. PlayerTextDrawHide(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_MODEL][index]]);
  316. PlayerTextDrawHide(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_LABEL][index]]);
  317.  
  318. index++;
  319. continue;
  320. }
  321.  
  322. Dialog_GetListitem(playerid, listitem, model, label, x, y, z, zoom, color1, color2);
  323. if (model < 0 || model > 20000)
  324. continue;
  325.  
  326. PlayerTextDrawColor(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_BAR][index]], Dialog_SetOpacity(0x788FB0FF, 200));
  327. PlayerTextDrawShow(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_BAR][index]]);
  328.  
  329. PlayerTextDrawSetPreviewModel(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_MODEL][index]], model);
  330. PlayerTextDrawSetPreviewRot(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_MODEL][index]], x, y, z, zoom);
  331. PlayerTextDrawSetPreviewVehCol(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_MODEL][index]], color1, color2);
  332. PlayerTextDrawShow(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_MODEL][index]]);
  333.  
  334. if (label[0])
  335. {
  336. PlayerTextDrawSetString(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_LABEL][index]], label);
  337. PlayerTextDrawShow(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_LABEL][index]]);
  338. }
  339.  
  340. index++;
  341. }
  342.  
  343. PlayerTextDrawColor(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_BAR][0]], Dialog_SetOpacity(0xFF5959FF, 200));
  344. PlayerTextDrawShow(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_BAR][0]]);
  345. }
  346. }
  347. }
  348.  
  349. forward Dialog_HideForPlayer(playerid);
  350. public Dialog_HideForPlayer(playerid)
  351. {
  352. switch (p_Dialog[playerid][E_PLAYER_DIALOG_STYLE])
  353. {
  354. case DIALOG_STYLE_MSGBOX..DIALOG_STYLE_TABLIST_HEADERS:
  355. {
  356. ShowPlayerDialog(playerid, -1, 0, "", "", "", "");
  357. }
  358.  
  359. case DIALOG_STYLE_PREVMODEL,
  360. DIALOG_STYLE_PREVMODEL_LIST:
  361. {
  362. Dialog_Exit(playerid);
  363.  
  364. p_Dialog[playerid][E_PLAYER_DIALOG_CANCELED] = true;
  365. CancelSelectTextDraw(playerid);
  366. }
  367. }
  368.  
  369. p_Dialog[playerid][E_PLAYER_DIALOG_ID] = -1;
  370. p_Dialog[playerid][E_PLAYER_DIALOG_STYLE] = -1;
  371. p_Dialog[playerid][E_PLAYER_DIALOG_DUAL_BTN] = false;
  372. p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEMS] = 0;
  373. p_Dialog[playerid][E_PLAYER_DIALOG_PAGE] = 0;
  374. p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEM_ID] = 0;
  375. p_Dialog[playerid][E_PLAYER_DIALOG_CLICK_TICKCOUNT] = 0;
  376. }
  377.  
  378. stock Dialog_ShowToPlayer(playerid, dialogid, style, caption[], info[], button1[], button2[])
  379. {
  380. if (playerid < 0 || playerid >= MAX_PLAYERS)
  381. return 0;
  382.  
  383. CallRemoteFunction("Dialog_HideForPlayer", "i", playerid);
  384.  
  385. if (dialogid < 0)
  386. {
  387. p_Dialog[playerid][E_PLAYER_DIALOG_ID] = -1;
  388. p_Dialog[playerid][E_PLAYER_DIALOG_STYLE] = -1;
  389. return 1;
  390. }
  391.  
  392. p_Dialog[playerid][E_PLAYER_DIALOG_ID] = dialogid;
  393. p_Dialog[playerid][E_PLAYER_DIALOG_STYLE] = style;
  394.  
  395. switch (style)
  396. {
  397. case DIALOG_STYLE_PREVMODEL,
  398. DIALOG_STYLE_PREVMODEL_LIST:
  399. {
  400. Dialog_Init(playerid, style, caption, button1, button2);
  401.  
  402. new pos;
  403. static str[5 + DIALOG_MAX_LISTITEM_SIZE];
  404. static str_model[5];
  405. static str_label[DIALOG_MAX_LISTITEM_SIZE / 2];
  406.  
  407. for (new i, j = strlen(info); i < j; i++)
  408. {
  409. if (info[i] == '\n')
  410. {
  411. strmid(str, info, pos, i);
  412. pos = (i + 1);
  413. }
  414. else if (i == (j - 1))
  415. {
  416. strmid(str, info, pos, j);
  417. }
  418. else continue;
  419.  
  420. for (new x, y = strlen(str); x < y; x++)
  421. {
  422. if (str[x] == '\t')
  423. {
  424. strmid(str_model, str, 0, x);
  425. strmid(str_label, str, (x + 1), y);
  426. break;
  427. }
  428. else if (x == (y - 1))
  429. {
  430. strmid(str_model, str, 0, y);
  431. str_label[0] = EOS;
  432. break;
  433. }
  434. }
  435.  
  436. Dialog_SetListitem(playerid, (p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEMS]++), strval(str_model), str_label, 0.0, 0.0, 0.0, 1.0, -1, -1);
  437. }
  438.  
  439. p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEM_ID] = 0;
  440. p_Dialog[playerid][E_PLAYER_DIALOG_PAGE] = 0;
  441.  
  442. Dialog_SetPage(playerid, 0);
  443. SelectTextDraw(playerid, Dialog_SetOpacity(0xD15454FF, 200));
  444. }
  445.  
  446. default:
  447. ShowPlayerDialog(playerid, dialogid, style, caption, info, button1, button2);
  448. }
  449.  
  450. return 1;
  451. }
  452. #if defined _ALS_ShowPlayerDialog
  453. #undef ShowPlayerDialog
  454. #else
  455. #define _ALS_ShowPlayerDialog
  456. #endif
  457. #define ShowPlayerDialog Dialog_ShowToPlayer
  458.  
  459. stock ShowPlayerPreviewModelDialog(playerid, dialogid, style, caption[], models[], labels[][], button1[], button2[], limit = sizeof (models), limit2 = sizeof (labels))
  460. {
  461. if (playerid < 0 || playerid >= MAX_PLAYERS)
  462. return 0;
  463.  
  464. CallRemoteFunction("Dialog_HideForPlayer", "i", playerid);
  465.  
  466. if (dialogid < 0)
  467. return 1;
  468.  
  469. switch (style)
  470. {
  471. case DIALOG_STYLE_PREVMODEL,
  472. DIALOG_STYLE_PREVMODEL_LIST:
  473. {
  474. }
  475.  
  476. default:
  477. return 0;
  478. }
  479.  
  480. p_Dialog[playerid][E_PLAYER_DIALOG_ID] = dialogid;
  481. p_Dialog[playerid][E_PLAYER_DIALOG_STYLE] = style;
  482.  
  483. Dialog_Init(playerid, style, caption, button1, button2);
  484.  
  485. p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEMS]= limit;
  486. for (new i; i < limit; i++)
  487. Dialog_SetListitem(playerid, i, models[i], ((i >= limit2) ? ("") : (labels[i])), 0.0, 0.0, 0.0, 1.0, -1, -1);
  488.  
  489. p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEM_ID] = 0;
  490. p_Dialog[playerid][E_PLAYER_DIALOG_PAGE] = 0;
  491.  
  492. Dialog_SetPage(playerid, 0);
  493. SelectTextDraw(playerid, Dialog_SetOpacity(0xD15454FF, 200));
  494.  
  495. return true;
  496. }
  497.  
  498. public OnPlayerClickTextDraw(playerid, Text:clickedid)
  499. {
  500. if (! p_Dialog[playerid][E_PLAYER_DIALOG_CANCELED])
  501. {
  502. switch (p_Dialog[playerid][E_PLAYER_DIALOG_STYLE])
  503. {
  504. case DIALOG_STYLE_PREVMODEL,
  505. DIALOG_STYLE_PREVMODEL_LIST:
  506. {
  507. if (clickedid == Text:INVALID_TEXT_DRAW)
  508. {
  509. Dialog_Exit(playerid);
  510.  
  511. new dialogid = p_Dialog[playerid][E_PLAYER_DIALOG_ID];
  512. new listitem = p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEM_ID];
  513.  
  514. p_Dialog[playerid][E_PLAYER_DIALOG_ID] = -1;
  515. p_Dialog[playerid][E_PLAYER_DIALOG_STYLE] = -1;
  516. p_Dialog[playerid][E_PLAYER_DIALOG_DUAL_BTN] = false;
  517. p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEMS] = 0;
  518. p_Dialog[playerid][E_PLAYER_DIALOG_PAGE] = 0;
  519. p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEM_ID] = 0;
  520. p_Dialog[playerid][E_PLAYER_DIALOG_CLICK_TICKCOUNT] = 0;
  521.  
  522. if (funcidx("OnDialogResponse") != -1)
  523. CallRemoteFunction("OnDialogResponse", "iiiis", playerid, dialogid, 0, listitem, "\1");
  524. }
  525.  
  526. return 1;
  527. }
  528. }
  529. }
  530.  
  531. p_Dialog[playerid][E_PLAYER_DIALOG_CANCELED] = false;
  532.  
  533. #if defined Dialog_OnPlayerClickTextDraw
  534. return Dialog_OnPlayerClickTextDraw(playerid, clickedid);
  535. #else
  536. return 0;
  537. #endif
  538. }
  539. #if defined _ALS_OnPlayerClickTextDraw
  540. #undef OnPlayerClickTextDraw
  541. #else
  542. #define _ALS_OnPlayerClickTextDraw
  543. #endif
  544. #define OnPlayerClickTextDraw Dialog_OnPlayerClickTextDraw
  545. #if defined Dialog_OnPlayerClickTextDraw
  546. forward Dialog_OnPlayerClickTextDraw(playerid, Text:clickedid);
  547. #endif
  548.  
  549. public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
  550. {
  551. switch (p_Dialog[playerid][E_PLAYER_DIALOG_STYLE])
  552. {
  553. case DIALOG_STYLE_PREVMODEL,
  554. DIALOG_STYLE_PREVMODEL_LIST:
  555. {
  556. if (playertextid == p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_BUTTON2]])
  557. {
  558. Dialog_Exit(playerid);
  559. p_Dialog[playerid][E_PLAYER_DIALOG_CANCELED] = true;
  560. CancelSelectTextDraw(playerid);
  561.  
  562. new dialogid = p_Dialog[playerid][E_PLAYER_DIALOG_ID];
  563. new listitem = p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEM_ID];
  564.  
  565. p_Dialog[playerid][E_PLAYER_DIALOG_ID] = -1;
  566. p_Dialog[playerid][E_PLAYER_DIALOG_STYLE] = -1;
  567. p_Dialog[playerid][E_PLAYER_DIALOG_DUAL_BTN] = false;
  568. p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEMS] = 0;
  569. p_Dialog[playerid][E_PLAYER_DIALOG_PAGE] = 0;
  570. p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEM_ID] = 0;
  571. p_Dialog[playerid][E_PLAYER_DIALOG_CLICK_TICKCOUNT] = 0;
  572.  
  573. if (funcidx("OnDialogResponse") != -1)
  574. CallRemoteFunction("OnDialogResponse", "iiiis", playerid, dialogid, 0, listitem, "\1");
  575. }
  576. else if (playertextid == p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_BUTTON1]] || playertextid == p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_BUTTONC]])
  577. {
  578. Dialog_Exit(playerid);
  579. p_Dialog[playerid][E_PLAYER_DIALOG_CANCELED] = true;
  580. CancelSelectTextDraw(playerid);
  581.  
  582. new dialogid = p_Dialog[playerid][E_PLAYER_DIALOG_ID];
  583. new listitem = p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEM_ID];
  584.  
  585. p_Dialog[playerid][E_PLAYER_DIALOG_ID] = -1;
  586. p_Dialog[playerid][E_PLAYER_DIALOG_STYLE] = -1;
  587. p_Dialog[playerid][E_PLAYER_DIALOG_DUAL_BTN] = false;
  588. p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEMS] = 0;
  589. p_Dialog[playerid][E_PLAYER_DIALOG_PAGE] = 0;
  590. p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEM_ID] = 0;
  591. p_Dialog[playerid][E_PLAYER_DIALOG_CLICK_TICKCOUNT] = 0;
  592.  
  593. if (funcidx("OnDialogResponse") != -1)
  594. CallRemoteFunction("OnDialogResponse", "iiiis", playerid, dialogid, 1, listitem, "\1");
  595. }
  596. else if (playertextid == p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_SCROLL_UP]])
  597. {
  598. if ((p_Dialog[playerid][E_PLAYER_DIALOG_PAGE] - 1) < 0)
  599. PlayerPlaySound(playerid, 1084, 0.0, 0.0, 0.0);
  600. else
  601. Dialog_SetPage(playerid, (--p_Dialog[playerid][E_PLAYER_DIALOG_PAGE]));
  602. }
  603. else if (playertextid == p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_SCROLL_DOWN]])
  604. {
  605. if ((p_Dialog[playerid][E_PLAYER_DIALOG_PAGE] + 1) >= Dialog_CountPages(p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEMS], ((p_Dialog[playerid][E_PLAYER_DIALOG_STYLE] == DIALOG_STYLE_PREVMODEL) ? (24) : (5))))
  606. PlayerPlaySound(playerid, 1084, 0.0, 0.0, 0.0);
  607. else
  608. Dialog_SetPage(playerid, (++p_Dialog[playerid][E_PLAYER_DIALOG_PAGE]));
  609. }
  610. else
  611. {
  612. new index = -1;
  613. switch (p_Dialog[playerid][E_PLAYER_DIALOG_STYLE])
  614. {
  615. case DIALOG_STYLE_PREVMODEL:
  616. {
  617. new listitem;
  618. for (new i; i < 24; i++)
  619. {
  620. listitem = ((p_Dialog[playerid][E_PLAYER_DIALOG_PAGE] * 24) + i);
  621. if (listitem >= p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEMS])
  622. break;
  623.  
  624. if (playertextid == p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_MODEL][i]])
  625. {
  626. p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEM_ID] = listitem;
  627. index = i;
  628. break;
  629. }
  630. }
  631. }
  632.  
  633. case DIALOG_STYLE_PREVMODEL_LIST:
  634. {
  635. new listitem;
  636. for (new i; i < 5; i++)
  637. {
  638. listitem = ((p_Dialog[playerid][E_PLAYER_DIALOG_PAGE] * 5) + i);
  639. if (listitem >= p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEMS])
  640. break;
  641.  
  642. if (playertextid == p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_BAR][i]])
  643. {
  644. p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEM_ID] = listitem;
  645. index = i;
  646. break;
  647. }
  648. }
  649. }
  650. }
  651.  
  652. if (index != -1)
  653. {
  654. if (GetTickCount() - p_Dialog[playerid][E_PLAYER_DIALOG_CLICK_TICKCOUNT] <= 200)
  655. {
  656. Dialog_Exit(playerid);
  657. p_Dialog[playerid][E_PLAYER_DIALOG_CANCELED] = true;
  658. CancelSelectTextDraw(playerid);
  659.  
  660. new dialogid = p_Dialog[playerid][E_PLAYER_DIALOG_ID];
  661. new listitem = p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEM_ID];
  662.  
  663. p_Dialog[playerid][E_PLAYER_DIALOG_ID] = -1;
  664. p_Dialog[playerid][E_PLAYER_DIALOG_STYLE] = -1;
  665. p_Dialog[playerid][E_PLAYER_DIALOG_DUAL_BTN] = false;
  666. p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEMS] = 0;
  667. p_Dialog[playerid][E_PLAYER_DIALOG_PAGE] = 0;
  668. p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEM_ID] = 0;
  669. p_Dialog[playerid][E_PLAYER_DIALOG_CLICK_TICKCOUNT] = 0;
  670.  
  671. if (funcidx("OnDialogResponse") != -1)
  672. CallRemoteFunction("OnDialogResponse", "iiiis", playerid, dialogid, 1, listitem, "\1");
  673. }
  674. else
  675. {
  676. switch (p_Dialog[playerid][E_PLAYER_DIALOG_STYLE])
  677. {
  678. case DIALOG_STYLE_PREVMODEL:
  679. {
  680. for (new i; i < 24; i++)
  681. {
  682. if (((p_Dialog[playerid][E_PLAYER_DIALOG_PAGE] * 24) + i) >= p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEMS])
  683. break;
  684.  
  685. PlayerTextDrawBackgroundColor(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_MODEL][i]], Dialog_SetOpacity(0x3B3B3BFF, 150));
  686. PlayerTextDrawShow(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_MODEL][i]]);
  687. }
  688. PlayerTextDrawBackgroundColor(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_MODEL][index]], Dialog_SetOpacity(0xFF5959FF, 150));
  689. PlayerTextDrawShow(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_MODEL][index]]);
  690. }
  691.  
  692. case DIALOG_STYLE_PREVMODEL_LIST:
  693. {
  694. for (new i; i < 5; i++)
  695. {
  696. if (((p_Dialog[playerid][E_PLAYER_DIALOG_PAGE] * 5) + i) >= p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEMS])
  697. break;
  698.  
  699. PlayerTextDrawColor(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_BAR][i]], Dialog_SetOpacity(0x788FB0FF, 200));
  700. PlayerTextDrawShow(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_BAR][i]]);
  701. }
  702. PlayerTextDrawColor(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_BAR][index]], Dialog_SetOpacity(0xFF5959FF, 200));
  703. PlayerTextDrawShow(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_BAR][index]]);
  704. }
  705. }
  706.  
  707. p_Dialog[playerid][E_PLAYER_DIALOG_CLICK_TICKCOUNT] = GetTickCount();
  708. }
  709. }
  710. }
  711.  
  712. return 1;
  713. }
  714. }
  715.  
  716. #if defined Dialog_OnPlayerClickPlayerTD
  717. return Dialog_OnPlayerClickPlayerTD(playerid, playertextid);
  718. #else
  719. return 0;
  720. #endif
  721. }
  722. #if defined _ALS_OnPlayerClickPlayerTD
  723. #undef OnPlayerClickPlayerTextDraw
  724. #else
  725. #define _ALS_OnPlayerClickPlayerTD
  726. #endif
  727. #define OnPlayerClickPlayerTextDraw Dialog_OnPlayerClickPlayerTD
  728. #if defined Dialog_OnPlayerClickPlayerTD
  729. forward Dialog_OnPlayerClickPlayerTD(playerid, PlayerText:playertextid);
  730. #endif
  731.  
  732. stock Dialog_SetModelRot(playerid, listitem, Float:x = 0.0, Float:y = 0.0, Float:z = 0.0, Float:zoom = 1.0, color1 = -1, color2 = -1)
  733. {
  734. if (playerid < 0 || playerid >= MAX_PLAYERS)
  735. return 0;
  736.  
  737. if (p_Dialog[playerid][E_PLAYER_DIALOG_STYLE] == -1)
  738. return 0;
  739.  
  740. new index;
  741. switch (p_Dialog[playerid][E_PLAYER_DIALOG_STYLE])
  742. {
  743. case DIALOG_STYLE_PREVMODEL,
  744. DIALOG_STYLE_PREVMODEL_LIST:
  745. {
  746. if (listitem >= p_Dialog[playerid][E_PLAYER_DIALOG_LISTITEMS])
  747. return 0;
  748.  
  749. if (p_Dialog[playerid][E_PLAYER_DIALOG_STYLE] == DIALOG_STYLE_PREVMODEL)
  750. index = listitem - (floatround(Float:(listitem - 24), floatround_floor) * 24);
  751. else
  752. index = listitem - (floatround(Float:(listitem - 5), floatround_floor) * 5);
  753.  
  754. new model, label[DIALOG_MAX_LISTITEM_SIZE], unused;
  755. Dialog_GetListitem(playerid, listitem, model, label, Float:unused, Float:unused, Float:unused, Float:unused, unused, unused);
  756. Dialog_SetListitem(playerid, listitem, model, label, x, y, z, zoom, color1, color2);
  757.  
  758. PlayerTextDrawSetPreviewRot(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_MODEL][index]], x, y, z, zoom);
  759. PlayerTextDrawSetPreviewVehCol(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_MODEL][index]], color1, color2);
  760. PlayerTextDrawShow(playerid, p_DialogTextDraw[playerid][p_DialogCompnent[playerid][E_DIALOG_COMPONENT_MODEL][index]]);
  761. }
  762.  
  763. default:
  764. return 0;
  765. }
  766.  
  767. return 1;
  768. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement