Advertisement
Guest User

Progressão Aritmética

a guest
Jun 4th, 2015
446
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 23.90 KB | None | 0 0
  1. //Creditos: Feito por Jimmy Servidor BRASIL NOVO MUNDO 0.3.7 IP: 198.50.140.128:7784
  2.  
  3. #define FILTERSCRIPT
  4. #include <a_samp>
  5. #include <sscanf2>
  6. #include <ZCMD>
  7.  
  8. #if defined FILTERSCRIPT
  9.  
  10. #define DIALOG_CALCULAR_A1    300
  11. #define DIALOG_CALCULAR_N     301
  12. #define DIALOG_CALCULAR_R     302
  13.  
  14. new PlayerText: Sn[MAX_PLAYERS], PlayerText: A1[MAX_PLAYERS], PlayerText: An[MAX_PLAYERS], PlayerText: n[MAX_PLAYERS], PlayerText: r[MAX_PLAYERS], PlayerText: Calcular[MAX_PLAYERS],
  15. PlayerText: Resposta[MAX_PLAYERS], PlayerText: FormulaAn[MAX_PLAYERS], PlayerText: Progressao[MAX_PLAYERS], PlayerText: CalcularAn1[MAX_PLAYERS], PlayerText: CalcularAn2[MAX_PLAYERS],
  16. PlayerText: CalcularAn3[MAX_PLAYERS], PlayerText: CalcularAn4[MAX_PLAYERS], PlayerText: FormulaSn[MAX_PLAYERS], PlayerText: CalcularSn1[MAX_PLAYERS], PlayerText: CalcularSn2[MAX_PLAYERS],
  17. PlayerText: CalcularSn3[MAX_PLAYERS], PlayerText: CalcularSn4[MAX_PLAYERS], PlayerText: CalcularSn5[MAX_PLAYERS], PlayerText: Fundo[3][MAX_PLAYERS], PlayerText: Fechar[MAX_PLAYERS];
  18.  
  19. new VAn[MAX_PLAYERS], VA1[MAX_PLAYERS], Vn[MAX_PLAYERS], Vr[MAX_PLAYERS];
  20.  
  21. public OnFilterScriptInit()
  22. {
  23.     print("\n--------------------------------------");
  24.     print(" Progressão Aritimética - Credito Jimmy");
  25.     print("--------------------------------------\n");
  26.     return 1;
  27. }
  28.  
  29. public OnFilterScriptExit()
  30. {
  31.     return 1;
  32. }
  33.  
  34. public OnPlayerConnect(playerid)
  35. {
  36.     CarregarTextdraw(playerid);
  37.     return 1;
  38. }
  39.  
  40. public OnPlayerDisconnect(playerid, reason)
  41. {
  42.     VAn[playerid] = -1;
  43.     VA1[playerid] = -1;
  44.     Vn[playerid] = -1;
  45.     Vr[playerid] = -1;
  46.     FecharTextdraw(playerid);
  47.     return 1;
  48. }
  49.  
  50. public OnPlayerSpawn(playerid)
  51. {
  52.     return 1;
  53. }
  54.  
  55. CMD:abrirprogressao(playerid)
  56. {
  57.     SelectTextDraw(playerid , 0xFFFFFFFF);
  58.     AbrirTextdraw(playerid);
  59.     return 1;
  60. }
  61.  
  62. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  63. {
  64.     if(dialogid == DIALOG_CALCULAR_A1)
  65.     {
  66.         if(response)
  67.         {
  68.             if(strfind(inputtext, "-", true) != -1)
  69.             {
  70.                 SendClientMessage( playerid, -1, "Esse número possui um caráter inválido!" );
  71.                 ShowPlayerDialog(playerid, DIALOG_CALCULAR_A1, DIALOG_STYLE_INPUT, "{00FF00}A1 - Primeiro Termo", "{FFFFFF}Insira o valor\n", "Continuar", "Fechar");
  72.                 return 1;
  73.             }
  74.             if( !strlen( inputtext ))
  75.             {
  76.                 SendClientMessage( playerid, -1, "Número inválido!" );
  77.                 ShowPlayerDialog(playerid, DIALOG_CALCULAR_A1, DIALOG_STYLE_INPUT, "{00FF00}A1 - Primeiro Termo", "{FFFFFF}Insira o valor\n", "Continuar", "Fechar");
  78.                 return 1;
  79.             }
  80.  
  81.             new string[50];
  82.             format(string, sizeof(string), "A1: %d", strval(inputtext));
  83.             PlayerTextDrawSetString(playerid, A1[playerid], string);
  84.             VA1[playerid] = strval(inputtext);
  85.         }
  86.     }
  87.     if(dialogid == DIALOG_CALCULAR_N)
  88.     {
  89.         if(response)
  90.         {
  91.             if(strfind(inputtext, "-", true) != -1)
  92.             {
  93.                 SendClientMessage( playerid, -1, "Esse número possui um caráter inválido!" );
  94.                 ShowPlayerDialog(playerid, DIALOG_CALCULAR_N, DIALOG_STYLE_INPUT, "{00FF00}n - Numero de termos", "{FFFFFF}Insira o valor\n", "Continuar", "Fechar");
  95.                 return 1;
  96.             }
  97.             if( !strlen( inputtext ))
  98.             {
  99.                 SendClientMessage( playerid, -1, "Número inválido!" );
  100.                 ShowPlayerDialog(playerid, DIALOG_CALCULAR_N, DIALOG_STYLE_INPUT, "{00FF00}n - Numero de termos", "{FFFFFF}Insira o valor\n", "Continuar", "Fechar");
  101.                 return 1;
  102.             }
  103.  
  104.             new string[50];
  105.             format(string, sizeof(string), "n: %d", strval(inputtext));
  106.             PlayerTextDrawSetString(playerid, n[playerid], string);
  107.             Vn[playerid] = strval(inputtext);
  108.         }
  109.     }
  110.     if(dialogid == DIALOG_CALCULAR_R)
  111.     {
  112.         if(response)
  113.         {
  114.             if(strfind(inputtext, "-", true) != -1)
  115.             {
  116.                 SendClientMessage( playerid, -1, "Esse número possui um caráter inválido!" );
  117.                 ShowPlayerDialog(playerid, DIALOG_CALCULAR_R, DIALOG_STYLE_INPUT, "{00FF00}r - Razão", "{FFFFFF}Insira o valor\n", "Continuar", "Fechar");
  118.                 return 1;
  119.             }
  120.             if( !strlen( inputtext ))
  121.             {
  122.                 SendClientMessage( playerid, -1, "Número inválido!" );
  123.                 ShowPlayerDialog(playerid, DIALOG_CALCULAR_R, DIALOG_STYLE_INPUT, "{00FF00}r - Razão", "{FFFFFF}Insira o valor\n", "Continuar", "Fechar");
  124.                 return 1;
  125.             }
  126.  
  127.             new string[50];
  128.             format(string, sizeof(string), "r: %d", strval(inputtext));
  129.             PlayerTextDrawSetString(playerid, r[playerid], string);
  130.             Vr[playerid] = strval(inputtext);
  131.         }
  132.     }   return 1;
  133. }
  134.  
  135. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  136. {
  137.     return 1;
  138. }
  139. public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
  140. {
  141.     SelectTextDraw(playerid , 0xFFFFFFFF);
  142.     if(playertextid == Fechar[playerid])
  143.     {
  144.         CancelSelectTextDraw(playerid);
  145.         FecharTextdraw(playerid);
  146.     }
  147.     if(playertextid == A1[playerid])
  148.     {
  149.         ShowPlayerDialog(playerid, DIALOG_CALCULAR_A1, DIALOG_STYLE_INPUT, "{00FF00}A1 - Primeiro Termo", "{FFFFFF}Insira o valor\n", "Continuar", "Fechar");
  150.     }
  151.     if(playertextid == n[playerid])
  152.     {
  153.         ShowPlayerDialog(playerid, DIALOG_CALCULAR_N, DIALOG_STYLE_INPUT, "{00FF00}n - Numero de termos", "{FFFFFF}Insira o valor\n", "Continuar", "Fechar");
  154.     }
  155.     if(playertextid == r[playerid])
  156.     {
  157.         ShowPlayerDialog(playerid, DIALOG_CALCULAR_R, DIALOG_STYLE_INPUT, "{00FF00}r - Razão", "{FFFFFF}Insira o valor\n", "Continuar", "Fechar");
  158.     }
  159.     if(playertextid == Calcular[playerid])
  160.     {
  161.         if(VA1[playerid] == 0 || Vn[playerid] == 0 || Vr[playerid] == 0) return SendClientMessage(playerid, -1,"Erro ! Coloque os valores A1, n e r .");
  162.         AbrirTextdrawCalculo(playerid);
  163.  
  164.         new Fase[5], string[50];
  165.         format(string, sizeof(string), "A%d = %d+(%d-1).%d", Vn[playerid], VA1[playerid], Vn[playerid], Vr[playerid]);
  166.         PlayerTextDrawSetString(playerid, CalcularAn1[playerid], string);
  167.  
  168.         Fase[0] = Vn[playerid] + -1;
  169.         format(string, sizeof(string), "A%d = %d+%d.%d", Vn[playerid], VA1[playerid], Fase[0], Vr[playerid]);
  170.         PlayerTextDrawSetString(playerid, CalcularAn2[playerid], string);
  171.  
  172.         Fase[1] = Fase[0]*Vr[playerid];
  173.         format(string, sizeof(string), "A%d = %d+%d", Vn[playerid], VA1[playerid], Fase[1]);
  174.         PlayerTextDrawSetString(playerid, CalcularAn3[playerid], string);
  175.  
  176.         VAn[playerid] = VA1[playerid] + Fase[1];
  177.         format(string, sizeof(string), "A%d = %d", Vn[playerid], VAn[playerid]);
  178.         PlayerTextDrawSetString(playerid, CalcularAn4[playerid], string);
  179.  
  180.         // SN
  181.  
  182.         format(string, sizeof(string), "Sn = (%d + %d).%d", VA1[playerid], VAn[playerid], Vn[playerid]);
  183.         PlayerTextDrawSetString(playerid, CalcularSn1[playerid], string);
  184.         PlayerTextDrawSetString(playerid, CalcularSn2[playerid], " 2");
  185.  
  186.         Fase[3] = VA1[playerid] + VAn[playerid];
  187.         format(string, sizeof(string), "Sn = %d . %d", Fase[3], Vn[playerid]);
  188.         PlayerTextDrawSetString(playerid, CalcularSn3[playerid], string);
  189.         PlayerTextDrawSetString(playerid, CalcularSn4[playerid], " 2");
  190.  
  191.         Fase[4] = Fase[3]*Vn[playerid]/2;
  192.         format(string, sizeof(string), "Sn = %d", Fase[4]);
  193.         PlayerTextDrawSetString(playerid, CalcularSn5[playerid], string);
  194.  
  195.     }
  196.     return 1;
  197. }
  198. CarregarTextdraw(playerid)
  199. {
  200.  
  201.     Fundo[0][playerid] = CreatePlayerTextDraw(playerid, 499.222229, 180.907409, "usebox");
  202.     PlayerTextDrawLetterSize(playerid, Fundo[1][playerid], 0.000000, 19.675100);
  203.     PlayerTextDrawTextSize(playerid, Fundo[1][playerid], 221.888885, 0.000000);
  204.     PlayerTextDrawAlignment(playerid, Fundo[1][playerid], 1);
  205.     PlayerTextDrawColor(playerid, Fundo[1][playerid], 0);
  206.     PlayerTextDrawUseBox(playerid, Fundo[1][playerid], true);
  207.     PlayerTextDrawBoxColor(playerid, Fundo[1][playerid], 471604479);
  208.     PlayerTextDrawSetShadow(playerid, Fundo[1][playerid], 0);
  209.     PlayerTextDrawSetOutline(playerid, Fundo[1][playerid], 0);
  210.     PlayerTextDrawFont(playerid, Fundo[1][playerid], 0);
  211.  
  212.     Fundo[1][playerid] = CreatePlayerTextDraw(playerid, 220.333358, 181.425933, "usebox");
  213.     PlayerTextDrawLetterSize(playerid, Fundo[1][playerid], 0.000000, 19.640127);
  214.     PlayerTextDrawTextSize(playerid, Fundo[1][playerid], 118.555572, 0.000000);
  215.     PlayerTextDrawAlignment(playerid, Fundo[1][playerid], 1);
  216.     PlayerTextDrawColor(playerid, Fundo[1][playerid], 0);
  217.     PlayerTextDrawUseBox(playerid, Fundo[1][playerid], true);
  218.     PlayerTextDrawBoxColor(playerid, Fundo[1][playerid], 471604479);
  219.     PlayerTextDrawSetShadow(playerid, Fundo[1][playerid], 0);
  220.     PlayerTextDrawSetOutline(playerid, Fundo[1][playerid], 0);
  221.     PlayerTextDrawFont(playerid, Fundo[1][playerid], 0);
  222.  
  223.     Fundo[2][playerid] = CreatePlayerTextDraw(playerid, 499.777801, 163.277770, "usebox");
  224.     PlayerTextDrawLetterSize(playerid, Fundo[2][playerid], 0.000000, 1.757408);
  225.     PlayerTextDrawTextSize(playerid, Fundo[2][playerid], 118.555564, 0.000000);
  226.     PlayerTextDrawAlignment(playerid, Fundo[2][playerid], 1);
  227.     PlayerTextDrawColor(playerid, Fundo[2][playerid], 0);
  228.     PlayerTextDrawUseBox(playerid, Fundo[2][playerid], true);
  229.     PlayerTextDrawBoxColor(playerid, Fundo[2][playerid], -5963521);
  230.     PlayerTextDrawSetShadow(playerid, Fundo[2][playerid], 0);
  231.     PlayerTextDrawSetOutline(playerid, Fundo[2][playerid], 0);
  232.     PlayerTextDrawFont(playerid, Fundo[2][playerid], 0);
  233.  
  234.     Sn[playerid] = CreatePlayerTextDraw(playerid, 128.888854, 192.888824, "~r~Sn: ?");
  235.     PlayerTextDrawLetterSize(playerid, Sn[playerid], 0.449999, 1.600000);
  236.     PlayerTextDrawAlignment(playerid, Sn[playerid], 1);
  237.     PlayerTextDrawColor(playerid, Sn[playerid], -1);
  238.     PlayerTextDrawSetShadow(playerid, Sn[playerid], 0);
  239.     PlayerTextDrawSetOutline(playerid, Sn[playerid], 1);
  240.     PlayerTextDrawBackgroundColor(playerid, Sn[playerid], 51);
  241.     PlayerTextDrawFont(playerid, Sn[playerid], 1);
  242.     PlayerTextDrawSetProportional(playerid, Sn[playerid], 1);
  243.     PlayerTextDrawSetSelectable(playerid, Sn[playerid], true);
  244.  
  245.     An[playerid] = CreatePlayerTextDraw(playerid, 128.333297, 231.259292, "~r~An: ?");
  246.     PlayerTextDrawLetterSize(playerid, An[playerid], 0.449999, 1.600000);
  247.     PlayerTextDrawAlignment(playerid, An[playerid], 1);
  248.     PlayerTextDrawColor(playerid, An[playerid], -1);
  249.     PlayerTextDrawSetShadow(playerid, An[playerid], 0);
  250.     PlayerTextDrawSetOutline(playerid, An[playerid], 1);
  251.     PlayerTextDrawBackgroundColor(playerid, An[playerid], 51);
  252.     PlayerTextDrawFont(playerid, An[playerid], 1);
  253.     PlayerTextDrawSetProportional(playerid, An[playerid], 1);
  254.  
  255.     A1[playerid] = CreatePlayerTextDraw(playerid, 129.444427, 212.074066, "A1: ?");
  256.     PlayerTextDrawLetterSize(playerid, A1[playerid], 0.449999, 1.600000);
  257.     PlayerTextDrawTextSize(playerid, A1[playerid], 268.000000, 15.916670);
  258.     PlayerTextDrawAlignment(playerid, A1[playerid], 1);
  259.     PlayerTextDrawColor(playerid, A1[playerid], -1);
  260.     PlayerTextDrawSetShadow(playerid, A1[playerid], 0);
  261.     PlayerTextDrawSetOutline(playerid, A1[playerid], 1);
  262.     PlayerTextDrawBackgroundColor(playerid, A1[playerid], 51);
  263.     PlayerTextDrawFont(playerid, A1[playerid], 1);
  264.     PlayerTextDrawSetProportional(playerid, A1[playerid], 1);
  265.     PlayerTextDrawSetSelectable(playerid, A1[playerid], true);
  266.  
  267.     n[playerid] = CreatePlayerTextDraw(playerid, 129.999954, 249.407485, "n: ?");
  268.     PlayerTextDrawLetterSize(playerid, n[playerid], 0.449999, 1.600000);
  269.     PlayerTextDrawTextSize(playerid, n[playerid], 268.000000, 15.916670);
  270.     PlayerTextDrawAlignment(playerid, n[playerid], 1);
  271.     PlayerTextDrawColor(playerid, n[playerid], -1);
  272.     PlayerTextDrawSetShadow(playerid, n[playerid], 0);
  273.     PlayerTextDrawSetOutline(playerid, n[playerid], 1);
  274.     PlayerTextDrawBackgroundColor(playerid, n[playerid], 51);
  275.     PlayerTextDrawFont(playerid, n[playerid], 1);
  276.     PlayerTextDrawSetProportional(playerid, n[playerid], 1);
  277.     PlayerTextDrawSetSelectable(playerid, n[playerid], true);
  278.  
  279.     r[playerid] = CreatePlayerTextDraw(playerid, 130.555526, 266.518524, "r: ?");
  280.     PlayerTextDrawLetterSize(playerid, r[playerid], 0.449999, 1.600000);
  281.     PlayerTextDrawTextSize(playerid, r[playerid], 268.000000, 15.916670);
  282.     PlayerTextDrawAlignment(playerid, r[playerid], 1);
  283.     PlayerTextDrawColor(playerid, r[playerid], -1);
  284.     PlayerTextDrawSetShadow(playerid, r[playerid], 0);
  285.     PlayerTextDrawSetOutline(playerid, r[playerid], 1);
  286.     PlayerTextDrawBackgroundColor(playerid, r[playerid], 51);
  287.     PlayerTextDrawFont(playerid, r[playerid], 1);
  288.     PlayerTextDrawSetProportional(playerid, r[playerid], 1);
  289.     PlayerTextDrawSetSelectable(playerid, r[playerid], true);
  290.  
  291.     Calcular[playerid] = CreatePlayerTextDraw(playerid, 133.888916, 310.074096, "Calcular");
  292.     PlayerTextDrawLetterSize(playerid, Calcular[playerid], 0.449999, 1.600000);
  293.     PlayerTextDrawTextSize(playerid, Calcular[playerid], 202.222229, 15.916670);
  294.     PlayerTextDrawAlignment(playerid, Calcular[playerid], 1);
  295.     PlayerTextDrawColor(playerid, Calcular[playerid], -1);
  296.     PlayerTextDrawUseBox(playerid, Calcular[playerid], true);
  297.     PlayerTextDrawBoxColor(playerid, Calcular[playerid], -2139062017);
  298.     PlayerTextDrawSetShadow(playerid, Calcular[playerid], 0);
  299.     PlayerTextDrawSetOutline(playerid, Calcular[playerid], 1);
  300.     PlayerTextDrawBackgroundColor(playerid, Calcular[playerid], 51);
  301.     PlayerTextDrawFont(playerid, Calcular[playerid], 3);
  302.     PlayerTextDrawSetProportional(playerid, Calcular[playerid], 1);
  303.     PlayerTextDrawSetSelectable(playerid, Calcular[playerid], true);
  304.  
  305.     Resposta[playerid] = CreatePlayerTextDraw(playerid, 234.444458, 189.259201, "Resposta:");
  306.     PlayerTextDrawLetterSize(playerid, Resposta[playerid], 0.449999, 1.600000);
  307.     PlayerTextDrawAlignment(playerid, Resposta[playerid], 1);
  308.     PlayerTextDrawColor(playerid, Resposta[playerid], -1);
  309.     PlayerTextDrawSetShadow(playerid, Resposta[playerid], 0);
  310.     PlayerTextDrawSetOutline(playerid, Resposta[playerid], 1);
  311.     PlayerTextDrawBackgroundColor(playerid, Resposta[playerid], 51);
  312.     PlayerTextDrawFont(playerid, Resposta[playerid], 3);
  313.     PlayerTextDrawSetProportional(playerid, Resposta[playerid], 1);
  314.  
  315.     FormulaAn[playerid] = CreatePlayerTextDraw(playerid, 232.777725, 221.407379, "An = A1+(n - 1).r");
  316.     PlayerTextDrawLetterSize(playerid, FormulaAn[playerid], 0.271666, 1.050371);
  317.     PlayerTextDrawAlignment(playerid, FormulaAn[playerid], 1);
  318.     PlayerTextDrawColor(playerid, FormulaAn[playerid], -1);
  319.     PlayerTextDrawSetShadow(playerid, FormulaAn[playerid], 0);
  320.     PlayerTextDrawSetOutline(playerid, FormulaAn[playerid], 1);
  321.     PlayerTextDrawBackgroundColor(playerid, FormulaAn[playerid], 51);
  322.     PlayerTextDrawFont(playerid, FormulaAn[playerid], 1);
  323.     PlayerTextDrawSetProportional(playerid, FormulaAn[playerid], 1);
  324.  
  325.     Progressao[playerid] = CreatePlayerTextDraw(playerid, 296.111083, 165.407409, "progressao aritmetica");
  326.     PlayerTextDrawLetterSize(playerid, Progressao[playerid], 0.281666, 1.164445);
  327.     PlayerTextDrawAlignment(playerid, Progressao[playerid], 1);
  328.     PlayerTextDrawColor(playerid, Progressao[playerid], -1);
  329.     PlayerTextDrawSetShadow(playerid, Progressao[playerid], 0);
  330.     PlayerTextDrawSetOutline(playerid, Progressao[playerid], 1);
  331.     PlayerTextDrawBackgroundColor(playerid, Progressao[playerid], 51);
  332.     PlayerTextDrawFont(playerid, Progressao[playerid], 3);
  333.     PlayerTextDrawSetProportional(playerid, Progressao[playerid], 1);
  334.  
  335.     CalcularAn1[playerid] = CreatePlayerTextDraw(playerid, 233.333297, 244.222198, " ");
  336.     PlayerTextDrawLetterSize(playerid, CalcularAn1[playerid], 0.322222, 1.065926);
  337.     PlayerTextDrawAlignment(playerid, CalcularAn1[playerid], 1);
  338.     PlayerTextDrawColor(playerid, CalcularAn1[playerid], -1);
  339.     PlayerTextDrawSetShadow(playerid, CalcularAn1[playerid], 0);
  340.     PlayerTextDrawSetOutline(playerid, CalcularAn1[playerid], 1);
  341.     PlayerTextDrawBackgroundColor(playerid, CalcularAn1[playerid], 51);
  342.     PlayerTextDrawFont(playerid, CalcularAn1[playerid], 1);
  343.     PlayerTextDrawSetProportional(playerid, CalcularAn1[playerid], 1);
  344.  
  345.     CalcularAn2[playerid] = CreatePlayerTextDraw(playerid, 233.888931, 256.666625, " ");
  346.     PlayerTextDrawLetterSize(playerid, CalcularAn2[playerid], 0.317221, 1.102222);
  347.     PlayerTextDrawAlignment(playerid, CalcularAn2[playerid], 1);
  348.     PlayerTextDrawColor(playerid, CalcularAn2[playerid], -1);
  349.     PlayerTextDrawSetShadow(playerid, CalcularAn2[playerid], 0);
  350.     PlayerTextDrawSetOutline(playerid, CalcularAn2[playerid], 1);
  351.     PlayerTextDrawBackgroundColor(playerid, CalcularAn2[playerid], 51);
  352.     PlayerTextDrawFont(playerid, CalcularAn2[playerid], 1);
  353.     PlayerTextDrawSetProportional(playerid, CalcularAn2[playerid], 1);
  354.  
  355.     CalcularAn3[playerid] = CreatePlayerTextDraw(playerid, 233.888870, 268.592498, " ");
  356.     PlayerTextDrawLetterSize(playerid, CalcularAn3[playerid], 0.320000, 1.122963);
  357.     PlayerTextDrawAlignment(playerid, CalcularAn3[playerid], 1);
  358.     PlayerTextDrawColor(playerid, CalcularAn3[playerid], -1);
  359.     PlayerTextDrawSetShadow(playerid, CalcularAn3[playerid], 0);
  360.     PlayerTextDrawSetOutline(playerid, CalcularAn3[playerid], 1);
  361.     PlayerTextDrawBackgroundColor(playerid, CalcularAn3[playerid], 51);
  362.     PlayerTextDrawFont(playerid, CalcularAn3[playerid], 1);
  363.     PlayerTextDrawSetProportional(playerid, CalcularAn3[playerid], 1);
  364.  
  365.     CalcularAn4[playerid] = CreatePlayerTextDraw(playerid, 233.333312, 281.036987, " ");
  366.     PlayerTextDrawLetterSize(playerid, CalcularAn4[playerid], 0.331666, 1.091852);
  367.     PlayerTextDrawAlignment(playerid, CalcularAn4[playerid], 1);
  368.     PlayerTextDrawColor(playerid, CalcularAn4[playerid], -1);
  369.     PlayerTextDrawSetShadow(playerid, CalcularAn4[playerid], 0);
  370.     PlayerTextDrawSetOutline(playerid, CalcularAn4[playerid], 1);
  371.     PlayerTextDrawBackgroundColor(playerid, CalcularAn4[playerid], 51);
  372.     PlayerTextDrawFont(playerid, CalcularAn4[playerid], 1);
  373.     PlayerTextDrawSetProportional(playerid, CalcularAn4[playerid], 1);
  374.  
  375.     FormulaSn[playerid] = CreatePlayerTextDraw(playerid, 380.000183, 221.407363, "Sn = (A1+An).n");
  376.     PlayerTextDrawLetterSize(playerid, FormulaSn[playerid], 0.317777, 0.988148);
  377.     PlayerTextDrawAlignment(playerid, FormulaSn[playerid], 1);
  378.     PlayerTextDrawColor(playerid, FormulaSn[playerid], -1);
  379.     PlayerTextDrawSetShadow(playerid, FormulaSn[playerid], 0);
  380.     PlayerTextDrawSetOutline(playerid, FormulaSn[playerid], 1);
  381.     PlayerTextDrawBackgroundColor(playerid, FormulaSn[playerid], 51);
  382.     PlayerTextDrawFont(playerid, FormulaSn[playerid], 1);
  383.     PlayerTextDrawSetProportional(playerid, FormulaSn[playerid], 1);
  384.  
  385.     CalcularSn1[playerid] = CreatePlayerTextDraw(playerid, 380.555480, 240.592514, " ");
  386.     PlayerTextDrawLetterSize(playerid, CalcularSn1[playerid], 0.313333, 1.081481);
  387.     PlayerTextDrawAlignment(playerid, CalcularSn1[playerid], 1);
  388.     PlayerTextDrawColor(playerid, CalcularSn1[playerid], -1);
  389.     PlayerTextDrawSetShadow(playerid, CalcularSn1[playerid], 0);
  390.     PlayerTextDrawSetOutline(playerid, CalcularSn1[playerid], 1);
  391.     PlayerTextDrawBackgroundColor(playerid, CalcularSn1[playerid], 51);
  392.     PlayerTextDrawFont(playerid, CalcularSn1[playerid], 1);
  393.     PlayerTextDrawSetProportional(playerid, CalcularSn1[playerid], 1);
  394.  
  395.     CalcularSn2[playerid] = CreatePlayerTextDraw(playerid, 422.777587, 250.962936, " 2");
  396.     PlayerTextDrawLetterSize(playerid, CalcularSn2[playerid], 0.371111, 1.003704);
  397.     PlayerTextDrawAlignment(playerid, CalcularSn2[playerid], 1);
  398.     PlayerTextDrawColor(playerid, CalcularSn2[playerid], -1);
  399.     PlayerTextDrawSetShadow(playerid, CalcularSn2[playerid], 0);
  400.     PlayerTextDrawSetOutline(playerid, CalcularSn2[playerid], 1);
  401.     PlayerTextDrawBackgroundColor(playerid, CalcularSn2[playerid], 51);
  402.     PlayerTextDrawFont(playerid, CalcularSn2[playerid], 1);
  403.     PlayerTextDrawSetProportional(playerid, CalcularSn2[playerid], 1);
  404.  
  405.     CalcularSn3[playerid] = CreatePlayerTextDraw(playerid, 382.222290, 269.629699, " ");
  406.     PlayerTextDrawLetterSize(playerid, CalcularSn3[playerid], 0.296111, 0.977777);
  407.     PlayerTextDrawAlignment(playerid, CalcularSn3[playerid], 1);
  408.     PlayerTextDrawColor(playerid, CalcularSn3[playerid], -1);
  409.     PlayerTextDrawSetShadow(playerid, CalcularSn3[playerid], 0);
  410.     PlayerTextDrawSetOutline(playerid, CalcularSn3[playerid], 1);
  411.     PlayerTextDrawBackgroundColor(playerid, CalcularSn3[playerid], 51);
  412.     PlayerTextDrawFont(playerid, CalcularSn3[playerid], 1);
  413.     PlayerTextDrawSetProportional(playerid, CalcularSn3[playerid], 1);
  414.  
  415.     CalcularSn4[playerid] = CreatePlayerTextDraw(playerid, 422.777587, 281.555572, " 2");
  416.     PlayerTextDrawLetterSize(playerid, CalcularSn4[playerid], 0.383888, 0.915555);
  417.     PlayerTextDrawAlignment(playerid, CalcularSn4[playerid], 1);
  418.     PlayerTextDrawColor(playerid, CalcularSn4[playerid], -1);
  419.     PlayerTextDrawSetShadow(playerid, CalcularSn4[playerid], 0);
  420.     PlayerTextDrawSetOutline(playerid, CalcularSn4[playerid], 1);
  421.     PlayerTextDrawBackgroundColor(playerid, CalcularSn4[playerid], 51);
  422.     PlayerTextDrawFont(playerid, CalcularSn4[playerid], 1);
  423.     PlayerTextDrawSetProportional(playerid, CalcularSn4[playerid], 1);
  424.  
  425.     CalcularSn5[playerid] = CreatePlayerTextDraw(playerid, 382.222381, 298.666717, " ");
  426.     PlayerTextDrawLetterSize(playerid, CalcularSn5[playerid], 0.334444, 0.925926);
  427.     PlayerTextDrawAlignment(playerid, CalcularSn5[playerid], 1);
  428.     PlayerTextDrawColor(playerid, CalcularSn5[playerid], -1);
  429.     PlayerTextDrawSetShadow(playerid, CalcularSn5[playerid], 0);
  430.     PlayerTextDrawSetOutline(playerid, CalcularSn5[playerid], 1);
  431.     PlayerTextDrawBackgroundColor(playerid, CalcularSn5[playerid], 51);
  432.     PlayerTextDrawFont(playerid, CalcularSn5[playerid], 1);
  433.     PlayerTextDrawSetProportional(playerid, CalcularSn5[playerid], 1);
  434.  
  435.     Fechar[playerid] = CreatePlayerTextDraw(playerid, 426.666839, 341.184844, "Cancelar");
  436.     PlayerTextDrawLetterSize(playerid, Fechar[playerid], 0.347777, 1.117778);
  437.     PlayerTextDrawTextSize(playerid, Fechar[playerid], 476.666503, 15.916670);
  438.     PlayerTextDrawAlignment(playerid, Fechar[playerid], 1);
  439.     PlayerTextDrawColor(playerid, Fechar[playerid], -1);
  440.     PlayerTextDrawUseBox(playerid, Fechar[playerid], true);
  441.     PlayerTextDrawBoxColor(playerid, Fechar[playerid], 1768516095);
  442.     PlayerTextDrawSetShadow(playerid, Fechar[playerid], 0);
  443.     PlayerTextDrawSetOutline(playerid, Fechar[playerid], 1);
  444.     PlayerTextDrawBackgroundColor(playerid, Fechar[playerid], -5963521);
  445.     PlayerTextDrawFont(playerid, Fechar[playerid], 1);
  446.     PlayerTextDrawSetProportional(playerid, Fechar[playerid], 1);
  447.     PlayerTextDrawSetSelectable(playerid, Fechar[playerid], true);
  448.  
  449. }
  450.  
  451. AbrirTextdraw(playerid)
  452. {
  453.     PlayerTextDrawShow(playerid, Fundo[0][playerid]);
  454.     PlayerTextDrawShow(playerid, Fundo[1][playerid]);
  455.     PlayerTextDrawShow(playerid, Fundo[2][playerid]);
  456.  
  457.     PlayerTextDrawShow(playerid, Fechar[playerid]);
  458.     PlayerTextDrawShow(playerid, Sn[playerid]);
  459.     PlayerTextDrawShow(playerid, A1[playerid]);
  460.     PlayerTextDrawShow(playerid, An[playerid]);
  461.     PlayerTextDrawShow(playerid, n[playerid]);
  462.     PlayerTextDrawShow(playerid, r[playerid]);
  463.     PlayerTextDrawShow(playerid, Calcular[playerid]);
  464.     PlayerTextDrawShow(playerid, Resposta[playerid]);
  465.     PlayerTextDrawShow(playerid, Progressao[playerid]);
  466. }
  467. AbrirTextdrawCalculo(playerid)
  468. {
  469.     PlayerTextDrawShow(playerid, FormulaAn[playerid]);
  470.     PlayerTextDrawShow(playerid, CalcularAn1[playerid]);
  471.     PlayerTextDrawShow(playerid, CalcularAn2[playerid]);
  472.     PlayerTextDrawShow(playerid, CalcularAn3[playerid]);
  473.     PlayerTextDrawShow(playerid, CalcularAn4[playerid]);
  474.     PlayerTextDrawShow(playerid, FormulaSn[playerid]);
  475.     PlayerTextDrawShow(playerid, CalcularSn1[playerid]);
  476.     PlayerTextDrawShow(playerid, CalcularSn2[playerid]);
  477.     PlayerTextDrawShow(playerid, CalcularSn3[playerid]);
  478.     PlayerTextDrawShow(playerid, CalcularSn4[playerid]);
  479.     PlayerTextDrawShow(playerid, CalcularSn5[playerid]);
  480. }
  481. FecharTextdraw(playerid)
  482. {
  483.     PlayerTextDrawHide(playerid, Fundo[0][playerid]);
  484.     PlayerTextDrawHide(playerid, Fundo[1][playerid]);
  485.     PlayerTextDrawHide(playerid, Fundo[2][playerid]);
  486.     PlayerTextDrawHide(playerid, Fechar[playerid]);
  487.     PlayerTextDrawHide(playerid, An[playerid]);
  488.     PlayerTextDrawHide(playerid, Sn[playerid]);
  489.     PlayerTextDrawHide(playerid, A1[playerid]);
  490.     PlayerTextDrawHide(playerid, n[playerid]);
  491.     PlayerTextDrawHide(playerid, r[playerid]);
  492.     PlayerTextDrawHide(playerid, Calcular[playerid]);
  493.     PlayerTextDrawHide(playerid, Resposta[playerid]);
  494.     PlayerTextDrawHide(playerid, FormulaAn[playerid]);
  495.     PlayerTextDrawHide(playerid, Progressao[playerid]);
  496.     PlayerTextDrawHide(playerid, CalcularAn1[playerid]);
  497.     PlayerTextDrawHide(playerid, CalcularAn2[playerid]);
  498.     PlayerTextDrawHide(playerid, CalcularAn3[playerid]);
  499.     PlayerTextDrawHide(playerid, CalcularAn4[playerid]);
  500.     PlayerTextDrawHide(playerid, FormulaSn[playerid]);
  501.     PlayerTextDrawHide(playerid, CalcularSn1[playerid]);
  502.     PlayerTextDrawHide(playerid, CalcularSn2[playerid]);
  503.     PlayerTextDrawHide(playerid, CalcularSn3[playerid]);
  504.     PlayerTextDrawHide(playerid, CalcularSn4[playerid]);
  505.     PlayerTextDrawHide(playerid, CalcularSn5[playerid]);
  506. }
  507.  
  508. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement