BCVBruno

[FS] Texto Cores Chat [Simples]

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