Advertisement
FamiliaSAMP

FILTERSCRIPT - Novo Chat 2.0 [BASE] [FAMILIASAMP.COM]

Feb 29th, 2016
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.04 KB | None | 0 0
  1.  
  2. #include <a_samp>
  3. new Text:TDchat[6][4],
  4. TDdata[4][100],
  5. TDname[4][25],
  6. COLORchat[4]={0x8700FFFF/*violeta*/,0x007AFFFF/*azul*/,0x008A00FF/*verde*/,0xFDFF00FF/*amarillo*/};
  7.  
  8. public OnPlayerText(playerid, text[]){
  9. if(strlen(text)<96 || strlen(text)>0){
  10. new name[25];
  11. GetPlayerName(playerid, name, 25);
  12. ActualizarCHAT(playerid, text, name);
  13. }
  14. return 0;
  15. }
  16.  
  17. stock ActualizarCHAT(playerid, text[], name[]){
  18. format(TDname[0],25,"%s",TDname[1]);
  19. format(TDname[1],25,"%s",TDname[2]);
  20. format(TDname[2],25,"%s",TDname[3]);
  21. format(TDname[3],25,"%s:",name);
  22.  
  23. format(TDdata[0],100,"%s",TDdata[1]);
  24. format(TDdata[1],100,"%s",TDdata[2]);
  25. format(TDdata[2],100,"%s",TDdata[3]);
  26. format(TDdata[3],100,"%s",text);
  27.  
  28. TextDrawSetString(TDchat[4][0], TDname[0]);
  29. TextDrawSetString(TDchat[4][1], TDname[1]);
  30. TextDrawSetString(TDchat[4][2], TDname[2]);
  31. TextDrawSetString(TDchat[4][3], TDname[3]);
  32.  
  33. TextDrawSetString(TDchat[5][0], TDdata[0]);
  34. TextDrawSetString(TDchat[5][1], TDdata[1]);
  35. TextDrawSetString(TDchat[5][2], TDdata[2]);
  36. TextDrawSetString(TDchat[5][3], TDdata[3]);
  37.  
  38. PlayerPlaySound(playerid, 21000, 0.0, 0.0, 0.0);
  39. for(new msg=0; msg<40; msg++)SendClientMessage(playerid,-1," ");
  40. }
  41.  
  42. public OnPlayerSpawn(playerid){
  43. for(new msg=0; msg<40; msg++)SendClientMessage(playerid,-1," ");
  44. for(new index=0; index<4; index++){
  45. for(new idx=0; idx<6; idx++){
  46. TextDrawHideForPlayer(playerid,TDchat[idx][index]);
  47. TextDrawShowForPlayer(playerid,TDchat[idx][index]);
  48. }
  49. }
  50. return true;
  51. }
  52.  
  53. public OnFilterScriptInit(){
  54. for(new index=0; index<4; index++){
  55. for(new idx=0; idx<6; idx++){
  56. TextDrawDestroy(TDchat[idx][index]);
  57.  
  58. if(index > 0){
  59. TDchat[0][index] = TextDrawCreate(62.000000, 12.437500+37*index, "usebox");
  60. TDchat[1][index] = TextDrawCreate(29.500000, 12.437500+37*index, "usebox");
  61. TDchat[2][index] = TextDrawCreate(43.500000, 7.437500+37*index, "!");
  62. TDchat[3][index] = TextDrawCreate(344.500000, 12.437500+37*index, "usebox");
  63. TDchat[4][index] = TextDrawCreate(73.500000, 17.062500+37*index, "_");//name
  64. TDchat[5][index] = TextDrawCreate(73.500000, 27.562500+37*index, "_");//text (max 96 caract)
  65. }else{
  66. TDchat[0][index] = TextDrawCreate(62.000000, 12.437500, "usebox");
  67. TDchat[1][index] = TextDrawCreate(29.500000, 12.437500, "usebox");
  68. TDchat[2][index] = TextDrawCreate(43.500000, 7.437500, "!");
  69. TDchat[3][index] = TextDrawCreate(344.500000, 12.437500, "usebox");
  70. TDchat[4][index] = TextDrawCreate(73.500000, 17.062500, "_");//name
  71. TDchat[5][index] = TextDrawCreate(73.500000, 27.562500, "_");//text (max 96 caract)
  72. }
  73.  
  74. TextDrawBoxColor(TDchat[1][index], COLORchat[index]);
  75. TextDrawColor(TDchat[2][index], COLORchat[index]);
  76. TextDrawColor(TDchat[4][index], COLORchat[index]);
  77.  
  78. TextDrawLetterSize(TDchat[0][index], 0.000000, 3.523611);
  79. TextDrawTextSize(TDchat[0][index], 24.000000, 0.000000);
  80. TextDrawAlignment(TDchat[0][index], 1);
  81. TextDrawColor(TDchat[0][index], 0);
  82. TextDrawUseBox(TDchat[0][index], true);
  83. TextDrawBoxColor(TDchat[0][index], 102);
  84. TextDrawSetShadow(TDchat[0][index], 0);
  85. TextDrawSetOutline(TDchat[0][index], 0);
  86. TextDrawFont(TDchat[0][index], 0);
  87.  
  88. TextDrawLetterSize(TDchat[1][index], 0.000000, 3.523611);
  89. TextDrawTextSize(TDchat[1][index], 24.500000, 0.000000);
  90. TextDrawAlignment(TDchat[1][index], 1);
  91. TextDrawColor(TDchat[1][index], 0);
  92. TextDrawUseBox(TDchat[1][index], true);
  93. TextDrawSetShadow(TDchat[1][index], 0);
  94. TextDrawSetOutline(TDchat[1][index], 0);
  95. TextDrawFont(TDchat[1][index], 0);
  96.  
  97. TextDrawLetterSize(TDchat[2][index], 1.032499, 4.071875);
  98. TextDrawAlignment(TDchat[2][index], 2);
  99. TextDrawSetShadow(TDchat[2][index], 0);
  100. TextDrawSetOutline(TDchat[2][index], 1);
  101. TextDrawBackgroundColor(TDchat[2][index], 51);
  102. TextDrawFont(TDchat[2][index], 0);
  103. TextDrawSetProportional(TDchat[2][index], 1);
  104.  
  105. TextDrawLetterSize(TDchat[3][index], 0.000000, 3.523611);
  106. TextDrawTextSize(TDchat[3][index], 60.500000, 0.000000);
  107. TextDrawAlignment(TDchat[3][index], 1);
  108. TextDrawColor(TDchat[3][index], 0);
  109. TextDrawUseBox(TDchat[3][index], true);
  110. TextDrawBoxColor(TDchat[3][index], 102);
  111. TextDrawSetShadow(TDchat[3][index], 0);
  112. TextDrawSetOutline(TDchat[3][index], 0);
  113. TextDrawFont(TDchat[3][index], 0);
  114.  
  115. TextDrawLetterSize(TDchat[4][index], 0.177499, 1.337500);
  116. TextDrawAlignment(TDchat[4][index], 1);
  117. TextDrawSetShadow(TDchat[4][index], 0);
  118. TextDrawSetOutline(TDchat[4][index], 1);
  119. TextDrawBackgroundColor(TDchat[4][index], 51);
  120. TextDrawFont(TDchat[4][index], 1);
  121. TextDrawSetProportional(TDchat[4][index], 1);
  122.  
  123. TextDrawLetterSize(TDchat[5][index], 0.155000, 1.249999);
  124. TextDrawAlignment(TDchat[5][index], 1);
  125. TextDrawColor(TDchat[5][index], -1);
  126. TextDrawSetShadow(TDchat[5][index], 0);
  127. TextDrawSetOutline(TDchat[5][index], 1);
  128. TextDrawBackgroundColor(TDchat[5][index], 51);
  129. TextDrawFont(TDchat[5][index], 1);
  130. TextDrawSetProportional(TDchat[5][index], 1);
  131. }
  132. }
  133. return true;
  134. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement