Advertisement
OtaconEvil

[FS] new chat 2.0 | v0.01 BASE | By OTACON

Sep 28th, 2015
1,094
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 6.36 KB | None | 0 0
  1. /*
  2.     * ## LEASE ATENTAMENTE PARA NO CONVERTIRSE EN LAMMER!!.: :D ##
  3.     *
  4.     * Estè Simple FILTERSCRIPT esta hecho especialmente para www.forum.sa-mp.com
  5.     * NO Publicar estè FILTERSCRIPT en Otros foros de SA-MP y hacerse pasar por el creador del CODE.
  6.     *
  7.     * Codigo Creado Por OTACON
  8.     *
  9.     * CREDITOS:
  10.     *     OTACON: Realizacion y Idea de creacion del code.
  11.     *     TÙ: Modificacion libremente respetando lo mencionado ;).
  12.     *
  13.     *    NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;)
  14.     *
  15.     *                Prohibido TOTALMENTE el Robo de Créditos o la
  16.     *                  Publicación de este FILTERSCRIPT sin Mi Permiso.
  17. */
  18. /*
  19.     * ## READ CAREFULLY TO AVOID BECOMING LAMMER!.: :D ##
  20.     *
  21.     * This simple FILTERSCRIPT is made especially for www.forum.sa-mp.com
  22.     * DO NOT Post the FILTERSCRIPT in Other SAMP forums and impersonating the creator of the CODE.
  23.     *
  24.     * Code Created By OTACON
  25.     *
  26.     * CREDITS:
  27.     *     OTACON: Idea Making and code creation.
  28.     *     YOUR: Modification freely respecting the above ;).
  29.     *
  30.     *    NOTE: Less Credits for those who criticize me.. JO'PUTAS! :D xD ;)
  31.     *
  32.     *                        FULLY spaces Theft Credit or
  33.     *                 Publication of this FILTERSCRIPT without my permission.
  34. */
  35.  
  36. #include <a_samp>
  37. new Text:TDchat[6][4],
  38. TDdata[4][100],
  39. TDname[4][25],
  40. COLORchat[4]={0x8700FFFF/*violeta*/,0x007AFFFF/*azul*/,0x008A00FF/*verde*/,0xFDFF00FF/*amarillo*/};
  41.  
  42. public OnPlayerText(playerid, text[]){
  43.     if(strlen(text)<96 || strlen(text)>0){
  44.         new name[25];
  45.         GetPlayerName(playerid, name, 25);
  46.         ActualizarCHAT(playerid, text, name);
  47.     }
  48.     return 0;
  49. }
  50.  
  51. stock ActualizarCHAT(playerid, text[], name[]){
  52.     format(TDname[0],25,"%s",TDname[1]);
  53.     format(TDname[1],25,"%s",TDname[2]);
  54.     format(TDname[2],25,"%s",TDname[3]);
  55.     format(TDname[3],25,"%s:",name);
  56.    
  57.     format(TDdata[0],100,"%s",TDdata[1]);
  58.     format(TDdata[1],100,"%s",TDdata[2]);
  59.     format(TDdata[2],100,"%s",TDdata[3]);
  60.     format(TDdata[3],100,"%s",text);
  61.    
  62.     TextDrawSetString(TDchat[4][0], TDname[0]);
  63.     TextDrawSetString(TDchat[4][1], TDname[1]);
  64.     TextDrawSetString(TDchat[4][2], TDname[2]);
  65.     TextDrawSetString(TDchat[4][3], TDname[3]);
  66.    
  67.     TextDrawSetString(TDchat[5][0], TDdata[0]);
  68.     TextDrawSetString(TDchat[5][1], TDdata[1]);
  69.     TextDrawSetString(TDchat[5][2], TDdata[2]);
  70.     TextDrawSetString(TDchat[5][3], TDdata[3]);
  71.    
  72.     PlayerPlaySound(playerid, 21000, 0.0, 0.0, 0.0);
  73.     for(new msg=0; msg<40; msg++)SendClientMessage(playerid,-1," ");
  74. }
  75.  
  76. public OnPlayerSpawn(playerid){
  77.     for(new msg=0; msg<40; msg++)SendClientMessage(playerid,-1," ");
  78.     for(new index=0; index<4; index++){
  79.         for(new idx=0; idx<6; idx++){
  80.             TextDrawHideForPlayer(playerid,TDchat[idx][index]);
  81.             TextDrawShowForPlayer(playerid,TDchat[idx][index]);
  82.         }
  83.     }
  84.     return true;
  85. }
  86.  
  87. public OnFilterScriptInit(){
  88.     for(new index=0; index<4; index++){
  89.         for(new idx=0; idx<6; idx++){
  90.             TextDrawDestroy(TDchat[idx][index]);
  91.            
  92.             if(index > 0){
  93.                 TDchat[0][index] = TextDrawCreate(62.000000, 12.437500+37*index, "usebox");
  94.                 TDchat[1][index] = TextDrawCreate(29.500000, 12.437500+37*index, "usebox");
  95.                 TDchat[2][index] = TextDrawCreate(43.500000, 7.437500+37*index, "!");
  96.                 TDchat[3][index] = TextDrawCreate(344.500000, 12.437500+37*index, "usebox");
  97.                 TDchat[4][index] = TextDrawCreate(73.500000, 17.062500+37*index, "_");//name
  98.                 TDchat[5][index] = TextDrawCreate(73.500000, 27.562500+37*index, "_");//text (max 96 caract)
  99.             }else{
  100.                 TDchat[0][index] = TextDrawCreate(62.000000, 12.437500, "usebox");
  101.                 TDchat[1][index] = TextDrawCreate(29.500000, 12.437500, "usebox");
  102.                 TDchat[2][index] = TextDrawCreate(43.500000, 7.437500, "!");
  103.                 TDchat[3][index] = TextDrawCreate(344.500000, 12.437500, "usebox");
  104.                 TDchat[4][index] = TextDrawCreate(73.500000, 17.062500, "_");//name
  105.                 TDchat[5][index] = TextDrawCreate(73.500000, 27.562500, "_");//text (max 96 caract)
  106.             }
  107.            
  108.             TextDrawBoxColor(TDchat[1][index], COLORchat[index]);
  109.             TextDrawColor(TDchat[2][index], COLORchat[index]);
  110.             TextDrawColor(TDchat[4][index], COLORchat[index]);
  111.  
  112.             TextDrawLetterSize(TDchat[0][index], 0.000000, 3.523611);
  113.             TextDrawTextSize(TDchat[0][index], 24.000000, 0.000000);
  114.             TextDrawAlignment(TDchat[0][index], 1);
  115.             TextDrawColor(TDchat[0][index], 0);
  116.             TextDrawUseBox(TDchat[0][index], true);
  117.             TextDrawBoxColor(TDchat[0][index], 102);
  118.             TextDrawSetShadow(TDchat[0][index], 0);
  119.             TextDrawSetOutline(TDchat[0][index], 0);
  120.             TextDrawFont(TDchat[0][index], 0);
  121.  
  122.             TextDrawLetterSize(TDchat[1][index], 0.000000, 3.523611);
  123.             TextDrawTextSize(TDchat[1][index], 24.500000, 0.000000);
  124.             TextDrawAlignment(TDchat[1][index], 1);
  125.             TextDrawColor(TDchat[1][index], 0);
  126.             TextDrawUseBox(TDchat[1][index], true);
  127.             TextDrawSetShadow(TDchat[1][index], 0);
  128.             TextDrawSetOutline(TDchat[1][index], 0);
  129.             TextDrawFont(TDchat[1][index], 0);
  130.            
  131.             TextDrawLetterSize(TDchat[2][index], 1.032499, 4.071875);
  132.             TextDrawAlignment(TDchat[2][index], 2);
  133.             TextDrawSetShadow(TDchat[2][index], 0);
  134.             TextDrawSetOutline(TDchat[2][index], 1);
  135.             TextDrawBackgroundColor(TDchat[2][index], 51);
  136.             TextDrawFont(TDchat[2][index], 0);
  137.             TextDrawSetProportional(TDchat[2][index], 1);
  138.  
  139.             TextDrawLetterSize(TDchat[3][index], 0.000000, 3.523611);
  140.             TextDrawTextSize(TDchat[3][index], 60.500000, 0.000000);
  141.             TextDrawAlignment(TDchat[3][index], 1);
  142.             TextDrawColor(TDchat[3][index], 0);
  143.             TextDrawUseBox(TDchat[3][index], true);
  144.             TextDrawBoxColor(TDchat[3][index], 102);
  145.             TextDrawSetShadow(TDchat[3][index], 0);
  146.             TextDrawSetOutline(TDchat[3][index], 0);
  147.             TextDrawFont(TDchat[3][index], 0);
  148.  
  149.             TextDrawLetterSize(TDchat[4][index], 0.177499, 1.337500);
  150.             TextDrawAlignment(TDchat[4][index], 1);
  151.             TextDrawSetShadow(TDchat[4][index], 0);
  152.             TextDrawSetOutline(TDchat[4][index], 1);
  153.             TextDrawBackgroundColor(TDchat[4][index], 51);
  154.             TextDrawFont(TDchat[4][index], 1);
  155.             TextDrawSetProportional(TDchat[4][index], 1);
  156.  
  157.             TextDrawLetterSize(TDchat[5][index], 0.155000, 1.249999);
  158.             TextDrawAlignment(TDchat[5][index], 1);
  159.             TextDrawColor(TDchat[5][index], -1);
  160.             TextDrawSetShadow(TDchat[5][index], 0);
  161.             TextDrawSetOutline(TDchat[5][index], 1);
  162.             TextDrawBackgroundColor(TDchat[5][index], 51);
  163.             TextDrawFont(TDchat[5][index], 1);
  164.             TextDrawSetProportional(TDchat[5][index], 1);
  165.         }
  166.     }
  167.     return true;
  168. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement