Guest User

[FS] Cores no Chat @Riichard

a guest
Apr 25th, 2012
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.75 KB | None | 0 0
  1. /*
  2. ______________|FilterScript|______________
  3. - Criador: @Riichard
  4. - Designer: @Riichard
  5. - Cores Retiradas de : www.mxstudio.com.br/Conteudos/Dreamweaver/Cores.htm
  6. - 7 Tipos de Cores Basicas.(Amarelo,Vermelho,Azul,Verde,Cinza,Rosa,Branco)
  7. - Não retire os créditos.
  8. - Equipe [SDS] Style Drift Show [SDS]
  9. - Site/Blog : equipe-sds.blogspot.com
  10. - Servidor : 69.162.102.12:7773
  11. ______________|FilterScript|______________
  12. */
  13. #include < a_samp >
  14.  
  15. // Variaveis & Defines :
  16. #define Textos 200 // Cuidado com os conflitos.
  17. new Texto1[MAX_PLAYERS];
  18. new Nick[MAX_PLAYER_NAME];
  19. new String[128];
  20.  
  21. // == Outros == //
  22. public OnFilterScriptInit()
  23. {
  24. print("\n*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
  25. print("[FilterScript] Texto Cores Chat");
  26. print("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\n");
  27. return 1;
  28. }
  29. // Comando
  30. public OnPlayerCommandText(playerid, cmdtext[])
  31. {
  32. if (strcmp(cmdtext, "/Textos", true) == 0)
  33. {
  34. ShowPlayerDialog(playerid, Textos, DIALOG_STYLE_LIST, "Escolha Sua Cor Preferida", "Texto 1 > {FFFF00}Amarelo\nTexto 2 > {FF0000}Vermelho\nTexto 3 > {00BFFF}Azul\nTexto 4 > {00FF00}Verde\nTexto 5 > {696969}Cinza\nTexto 6 > {FF00FF}Rosa\nTexto 7 > Branco", "Selecionar", "Cancelar");
  35. GetPlayerName(playerid, Nick, MAX_PLAYER_NAME);
  36. format(String, sizeof(String), "%s » Está vendo modificações em seu texto. {FFFFFF}/Textos", Nick);
  37. SendClientMessageToAll(0x6C7B8BFF, String);
  38. return 1;
  39. }
  40. return 0;
  41. }
  42. // Chat Com as Cores Prontas.
  43. public OnPlayerText(playerid, text[])
  44. {
  45. if (strlen(text) > 48)
  46. {
  47. SendClientMessage(playerid, -1, "Texto Muito Grande » Maximo Permitido : 48 !");
  48. return 0;
  49. }
  50. // Amarelo
  51. if (Texto1[playerid] == 1)
  52. {
  53. format(String, sizeof(String), "{FFFF00}%s", text[0]);
  54. SendPlayerMessageToAll(playerid, String);
  55. return 0;
  56. }
  57. // Vermelho
  58. if (Texto1[playerid] == 2)
  59. {
  60. format(String, sizeof(String), "{FF0000}%s", text[0]);
  61. SendPlayerMessageToAll(playerid, String);
  62. return 0;
  63. }
  64. // Azul
  65. if (Texto1[playerid] == 3)
  66. {
  67. format(String, sizeof(String), "{00BFFF}%s", text[0]);
  68. SendPlayerMessageToAll(playerid, String);
  69. return 0;
  70. }
  71. // Verde
  72. if (Texto1[playerid] == 4)
  73. {
  74. format(String, sizeof(String), "{00FF00}%s", text[0]);
  75. SendPlayerMessageToAll(playerid, String);
  76. return 0;
  77. }
  78. // Cinza
  79. if (Texto1[playerid] == 5)
  80. {
  81. format(String, sizeof(String), "{696969}%s", text[0]);
  82. SendPlayerMessageToAll(playerid, String);
  83. return 0;
  84. }
  85. // Rosa
  86. if (Texto1[playerid] == 6)
  87. {
  88. format(String, sizeof(String), "{FF00FF}%s", text[0]);
  89. SendPlayerMessageToAll(playerid, String);
  90. return 0;
  91. }
  92. // Branco
  93. if (Texto1[playerid] == 7)
  94. {
  95. format(String, sizeof(String), "{FFFFFF}%s", text[0]);
  96. SendPlayerMessageToAll(playerid, String);
  97. return 0;
  98. }
  99. return 1;
  100. }
  101. // Response Dialog
  102. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  103. {
  104. if (dialogid == Textos)
  105. {
  106. if (response)
  107. {
  108. if (listitem == 0) // Amarelo
  109. {
  110. Texto1[playerid] = 1;
  111. SendClientMessage(playerid, -1, "» Você Mudou Sua Cor de Texto para > {FFFF00}Amarelo");
  112. }
  113. if (listitem == 1) // Vermelho
  114. {
  115. Texto1[playerid] = 2;
  116. SendClientMessage(playerid, -1, "» Você Mudou Sua Cor de Texto para > {FF0000}Vermelho");
  117. }
  118. if (listitem == 2) // Azul
  119. {
  120. Texto1[playerid] = 3;
  121. SendClientMessage(playerid, -1, "» Você Mudou Sua Cor de Texto para > {00BFFF}Azul");
  122. }
  123. if (listitem == 3) // Verde
  124. {
  125. Texto1[playerid] = 4;
  126. SendClientMessage(playerid, -1, "» Você Mudou Sua Cor de Texto para > {00FF00}Verde");
  127. }
  128. if (listitem == 4) // Cinza
  129. {
  130. Texto1[playerid] = 5;
  131. SendClientMessage(playerid, -1, "» Você Mudou Sua Cor de Texto para > {696969}Cinza");
  132. }
  133. if (listitem == 5) // Rosa
  134. {
  135. Texto1[playerid] = 6;
  136. SendClientMessage(playerid, -1, "» Você Mudou Sua Cor de Texto para > {FF00FF}Rosa");
  137. }
  138. if (listitem == 6) // Branco
  139. {
  140. Texto1[playerid] = 7;
  141. SendClientMessage(playerid, -1, "» Você Mudou Sua Cor de Texto para > {FFFFFF}Branco");
  142. }
  143. }
  144. }
  145. return 0;
  146. }
Advertisement
Add Comment
Please, Sign In to add comment