Advertisement
Guest User

Seif

a guest
Aug 20th, 2008
672
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 67.83 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #define dcmd(%1,%2,%3) if((strcmp((%3)[1], #%1, true, (%2)) == 0)&&((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2])))))return 1
  4.  
  5. #define red 0
  6. #define blue 1
  7. #define green 2
  8. #define yellow 3
  9. #define pink 4
  10. #define light_blue 5
  11. #define white 6
  12. #define black 7
  13.  
  14. new Menu:Main, Menu:Main2, Menu:AlignmentM, Menu:ColorM, Menu:TransparencyM, Menu:Box1M, Menu:ShadowM, Menu:ProportionalM, Menu:FontM, Menu:OutlineM, Text:Textdraw[95],
  15.     Menu:PreMain, Menu:PreMain2, Menu:PreMain3, Menu:PreMain4, Menu:PreMain5, Menu:PreMain6, Menu:PreMain7, Menu:PreMain8, Menu:PreMain9, Menu:PreMain10;
  16. new textdrawtext[95][256], Float:textx[95] = {1.0,...}, Float:texty[95] = {1.0,...}, Float:lettersizex[95] = {1.0,...}, Float:lettersizey[95] = {1.0,...}, Float:boxsizex[95] = {0.0,...},
  17.     Float:boxsizey[95] = {0.0,...}, alignment[95], box[95], boxcolor[95] = {0x000000FF,...}, backcolor[95] = {0x000000FF,...}, proportional[95] = {1,...}, font[95] = {3,...}, shadow[95] = {1,...}, outline[95] = {1,...},
  18.     textcolor[95] = {0xFFFFFFFF,...};
  19.  
  20. new menu, writing, saving, movingtext, lettersizing, color, boxsizing, currtextdraw, textdrawactive[95];
  21.  
  22. new red100,red80,red60,red40,red20,red0;
  23. new blue100,blue80,blue60,blue40,blue20,blue0;
  24. new green100,green80,green60,green40,green20,green0;
  25. new yellow100,yellow80,yellow60,yellow40,yellow20,yellow0;
  26. new pink100,pink80,pink60,pink40,pink20,pink0;
  27. new light_blue100,light_blue80,light_blue60,light_blue40,light_blue20,light_blue0;
  28. new white100,white80,white60,white40,white20,white0;
  29. new black100,black80,black60,black40,black20,black0;
  30.  
  31. forward HoldKey(playerid);
  32.  
  33. public OnFilterScriptInit()
  34. {
  35.     print("\n--------------------------------------");
  36.     print(" TextDraw Filtescript by Zamaroht Loaded!");
  37.     print("--------------------------------------\n");
  38.  
  39.     color=0xFFFFFFFF;
  40.  
  41.     red100=0xff0000ff;
  42.     blue100=0x0000ffff;
  43.     green100=0x00ff00ff;
  44.     yellow100=0xffff00ff;
  45.     pink100=0xff00ffff;
  46.     light_blue100=0x00ffffff;
  47.     white100=0xffffffff;
  48.     black100=0x000000ff;
  49.  
  50.     red80=0xff0000cc;
  51.     blue80=0x0000ffcc;
  52.     green80=0x00ff00cc;
  53.     yellow80=0xffff00cc;
  54.     pink80=0xff00ffcc;
  55.     light_blue80=0x00ffffcc;
  56.     white80=0xffffffcc;
  57.     black80=0x000000cc;
  58.  
  59.     red60=0xff000099;
  60.     blue60=0x0000ff99;
  61.     green60=0x00ff0099;
  62.     yellow60=0xffff0099;
  63.     pink60=0xff00ff99;
  64.     light_blue60=0x00ffff99;
  65.     white60=0xffffff99;
  66.     black60=0x00000099;
  67.  
  68.     red40=0xff000066;
  69.     blue40=0x0000ff66;
  70.     green40=0x00ff0066;
  71.     yellow40=0xffff0066;
  72.     pink40=0xff00ff66;
  73.     light_blue40=0x00ffff66;
  74.     white40=0xffffff66;
  75.     black40=0x00000066;
  76.  
  77.     red20=0xff000033;
  78.     blue20=0x0000ff33;
  79.     green20=0x00ff0033;
  80.     yellow20=0xffff0033;
  81.     pink20=0xff00ff33;
  82.     light_blue20=0x00ffff33;
  83.     white20=0xffffff33;
  84.     black20=0x00000033;
  85.  
  86.     red0=0xff000000;
  87.     blue0=0x0000ff00;
  88.     green0=0x00ff0000;
  89.     yellow0=0xffff0000;
  90.     pink0=0xff00ff00;
  91.     light_blue0=0x00ffff00;
  92.     white0=0xffffff00;
  93.     black0=0x00000000;
  94.  
  95.     FontM = CreateMenu("Font",2,200,100,150,100);
  96.     AddMenuItem(FontM, 0, "Type 0");          //0
  97.     AddMenuItem(FontM, 0, "Type 1");          //1
  98.     AddMenuItem(FontM, 0, "Type 2");          //2
  99.     AddMenuItem(FontM, 0, "Type 3");          //3
  100.     OutlineM = CreateMenu("Outline",2,200,100,150,100);
  101.     AddMenuItem(OutlineM, 0, "On");           //0
  102.     AddMenuItem(OutlineM, 0, "Off");          //1
  103.     Box1M = CreateMenu("Box",2,200,100,150,100);
  104.     AddMenuItem(Box1M, 0, "On");           //0
  105.     AddMenuItem(Box1M, 0, "Off");          //1
  106.     ShadowM = CreateMenu("Shadow",2,200,100,150,100);
  107.     AddMenuItem(ShadowM, 0, "Off");           //0
  108.     AddMenuItem(ShadowM, 0, "Size 1");        //1
  109.     AddMenuItem(ShadowM, 0, "Size 2");        //2
  110.     AddMenuItem(ShadowM, 0, "Size 3");        //3
  111.     AddMenuItem(ShadowM, 0, "Size 4");        //4
  112.     AddMenuItem(ShadowM, 0, "Size 5");        //5
  113.     AddMenuItem(ShadowM, 0, "Size 6");        //6
  114.     AddMenuItem(ShadowM, 0, "Size 7");        //7
  115.     AddMenuItem(ShadowM, 0, "Size 8");        //8
  116.     AddMenuItem(ShadowM, 0, "Size 9");        //9
  117.     AddMenuItem(ShadowM, 0, "Size 10");       //10
  118.     AlignmentM = CreateMenu("Alignment",2,200,100,150,100);
  119.     AddMenuItem(AlignmentM, 0, "Justified");           //0
  120.  
  121.     AddMenuItem(AlignmentM, 0, "Left");                //1
  122.     AddMenuItem(AlignmentM, 0, "Centre");              //2
  123.     AddMenuItem(AlignmentM, 0, "Right");               //3
  124.     ProportionalM = CreateMenu("Proportional",2,200,100,150,100);
  125.     AddMenuItem(ProportionalM, 0, "On");           //0
  126.     AddMenuItem(ProportionalM, 0, "Off");          //1
  127.     ColorM = CreateMenu("Text Color",2,200,100,150,100);
  128.     AddMenuItem(ColorM, 0, "Red");                 //0
  129.     AddMenuItem(ColorM, 0, "Blue");                //1
  130.     AddMenuItem(ColorM, 0, "Green");               //2
  131.     AddMenuItem(ColorM, 0, "Yellow");              //3
  132.     AddMenuItem(ColorM, 0, "Pink");                //4
  133.     AddMenuItem(ColorM, 0, "Light Blue");          //5
  134.     AddMenuItem(ColorM, 0, "White");               //6
  135.     AddMenuItem(ColorM, 0, "Black");               //7
  136.     TransparencyM = CreateMenu("Transparency",2,200,100,150,100);
  137.     AddMenuItem(TransparencyM, 0, "100%");                //0
  138.     AddMenuItem(TransparencyM, 0, "80%");                 //1
  139.     AddMenuItem(TransparencyM, 0, "60%");                 //2
  140.     AddMenuItem(TransparencyM, 0, "40%");                 //3
  141.     AddMenuItem(TransparencyM, 0, "20%");                 //4
  142.     AddMenuItem(TransparencyM, 0, "0%");                  //5
  143.     Main = CreateMenu("TextDraw",2,200,100,150,100);
  144.     AddMenuItem(Main, 0, "Write Text");                //0
  145.     AddMenuItem(Main, 0, "Select Position");           //1
  146.     AddMenuItem(Main, 0, "Letter Size");               //2
  147.     AddMenuItem(Main, 0, "Alignment");                 //3
  148.     AddMenuItem(Main, 0, "Text Color");                //4
  149.     AddMenuItem(Main, 0, "Box (+box color/+box size)");//5
  150.     AddMenuItem(Main, 0, "Background Color");          //6
  151.     AddMenuItem(Main, 0, "Shadow");                    //7
  152.     AddMenuItem(Main, 0, "Set Proportional");          //8
  153.     AddMenuItem(Main, 0, "Font");                      //9
  154.     AddMenuItem(Main, 0, "Outline");                   //10
  155.     AddMenuItem(Main, 0, "More...");                   //11
  156.     Main2 = CreateMenu("TextDraw",2,200,100,300,10);
  157.     AddMenuItem(Main2, 0, "Go back...");                //0
  158.     AddMenuItem(Main2, 0, "-> Save all textdraws to file!");       //1
  159.     AddMenuItem(Main2, 0, "Delete Textdraw");           //2
  160.     for(new i;i<95;i++)
  161.         {
  162.         Textdraw[i] = TextDrawCreate(0.0,0.0," ");
  163.         textdrawtext[i] = " ";
  164.         UpdateTextDraw(i,0);
  165.         }
  166.     return 1;
  167. }
  168.  
  169. public OnFilterScriptExit()
  170. {
  171.     for(new i;i<95;i++)
  172.         {
  173.         if(textdrawactive[i]) TextDrawDestroy(Textdraw[i]);
  174.         }
  175.     return 1;
  176. }
  177.  
  178. public OnPlayerSpawn(playerid)
  179. {
  180.     SendClientMessage(playerid,0x554466AA,"Do /text for create new TextDraw, /edit [id] for jump directly to a individual");
  181.     SendClientMessage(playerid,0x554466AA,"textdraw edition.");
  182.     for(new i;i<95;i++)
  183.         {
  184.         TextDrawShowForPlayer(playerid, Textdraw[i]);
  185.         }
  186.     return 1;
  187. }
  188.  
  189. public OnPlayerCommandText(playerid, cmdtext[])
  190. {
  191.     if (strcmp("/text", cmdtext, true, 10) == 0)
  192.     {
  193.         if(writing || movingtext || lettersizing || boxsizing || saving)
  194.             {
  195.             SendClientMessage(playerid,0x554466AA,"Complete the current operation first");
  196.             }
  197.         else
  198.             {
  199.             menu=100;
  200.             PreMain = CreateMenu("Select Textdraw",2,200,100,150,100);
  201.             PreMain2 = CreateMenu("Select Textdraw",2,200,100,150,100);
  202.             PreMain3 = CreateMenu("Select Textdraw",2,200,100,150,100);
  203.             PreMain4 = CreateMenu("Select Textdraw",2,200,100,150,100);
  204.             PreMain5 = CreateMenu("Select Textdraw",2,200,100,150,100);
  205.             PreMain6 = CreateMenu("Select Textdraw",2,200,100,150,100);
  206.             PreMain7 = CreateMenu("Select Textdraw",2,200,100,150,100);
  207.             PreMain8 = CreateMenu("Select Textdraw",2,200,100,150,100);
  208.             PreMain9 = CreateMenu("Select Textdraw",2,200,100,150,100);
  209.             PreMain10 = CreateMenu("Select Textdraw",2,200,100,150,100);
  210.             new tmpvar;
  211.             for(new i;i<95;i++)
  212.                 {
  213.                 if(textdrawactive[i]==1) tmpvar=i;
  214.                 }
  215.             new tmpstr[20];
  216.             AddMenuItem(PreMain, 0, "New Textdraw...");
  217.             for(new i;i<95;i++)
  218.                 {
  219.                 if(i<=tmpvar && i < 10)
  220.                     {
  221.                     if(textdrawactive[i]) format(tmpstr,20,"Textdraw %d",i);
  222.                     else format(tmpstr,20,"...",i);
  223.                     AddMenuItem(PreMain, 0, tmpstr);
  224.                     }
  225.                 }
  226.             if(tmpvar >= 10)
  227.                 {
  228.                 AddMenuItem(PreMain, 0, "Next page...");
  229.                 AddMenuItem(PreMain2, 0, "Previous page...");
  230.                 for(new i;i<95;i++)
  231.                     {
  232.                     if(i<=tmpvar && i >= 10 && i < 20)
  233.                         {
  234.                         if(textdrawactive[i]) format(tmpstr,20,"Textdraw %d",i);
  235.                         else format(tmpstr,20,"...",i);
  236.                         AddMenuItem(PreMain2, 0, tmpstr);
  237.                         }
  238.                     }
  239.                 if(tmpvar >= 20)
  240.                     {
  241.                     AddMenuItem(PreMain2, 0, "Next page...");
  242.                     AddMenuItem(PreMain3, 0, "Previous page...");
  243.                     for(new i;i<95;i++)
  244.                         {
  245.                         if(i<=tmpvar && i >= 20 && i < 30)
  246.                             {
  247.                             if(textdrawactive[i]) format(tmpstr,20,"Textdraw %d",i);
  248.                             else format(tmpstr,20,"...",i);
  249.                             AddMenuItem(PreMain3, 0, tmpstr);
  250.                             }
  251.                         }
  252.                     if(tmpvar >= 30)
  253.                         {
  254.                         AddMenuItem(PreMain3, 0, "Next page...");
  255.                         AddMenuItem(PreMain4, 0, "Previous page...");
  256.                         for(new i;i<95;i++)
  257.                             {
  258.                             if(i<=tmpvar && i >= 30 && i < 40)
  259.                                 {
  260.                                 if(textdrawactive[i]) format(tmpstr,20,"Textdraw %d",i);
  261.                                 else format(tmpstr,20,"...",i);
  262.                                 AddMenuItem(PreMain4, 0, tmpstr);
  263.                                 }
  264.                             }
  265.                         if(tmpvar >= 40)
  266.                             {
  267.                             AddMenuItem(PreMain4, 0, "Next page...");
  268.                             AddMenuItem(PreMain5, 0, "Previous page...");
  269.                             for(new i;i<95;i++)
  270.                                 {
  271.                                 if(i<=tmpvar && i >= 40 && i < 50)
  272.                                     {
  273.                                     if(textdrawactive[i]) format(tmpstr,20,"Textdraw %d",i);
  274.                                     else format(tmpstr,20,"...",i);
  275.                                     AddMenuItem(PreMain5, 0, tmpstr);
  276.                                     }
  277.                                 }
  278.                             if(tmpvar >= 50)
  279.                                 {
  280.                                 AddMenuItem(PreMain5, 0, "Next page...");
  281.                                 AddMenuItem(PreMain6, 0, "Previous page...");
  282.                                 for(new i;i<95;i++)
  283.                                     {
  284.                                     if(i<=tmpvar && i >= 50 && i < 60)
  285.                                         {
  286.                                         if(textdrawactive[i]) format(tmpstr,20,"Textdraw %d",i);
  287.                                         else format(tmpstr,20,"...",i);
  288.                                         AddMenuItem(PreMain6, 0, tmpstr);
  289.                                         }
  290.                                     }
  291.                                 if(tmpvar >= 60)
  292.                                     {
  293.                                     AddMenuItem(PreMain6, 0, "Next page...");
  294.                                     AddMenuItem(PreMain7, 0, "Previous page...");
  295.                                     for(new i;i<95;i++)
  296.                                         {
  297.                                         if(i<=tmpvar && i >= 60 && i < 70)
  298.                                             {
  299.                                             if(textdrawactive[i]) format(tmpstr,20,"Textdraw %d",i);
  300.                                             else format(tmpstr,20,"...",i);
  301.                                             AddMenuItem(PreMain7, 0, tmpstr);
  302.                                             }
  303.                                         }
  304.                                     if(tmpvar >= 70)
  305.                                         {
  306.                                         AddMenuItem(PreMain7, 0, "Next page...");
  307.                                         AddMenuItem(PreMain8, 0, "Previous page...");
  308.                                         for(new i;i<95;i++)
  309.                                             {
  310.                                             if(i<=tmpvar && i >= 70 && i < 80)
  311.                                                 {
  312.                                                 if(textdrawactive[i]) format(tmpstr,20,"Textdraw %d",i);
  313.                                                 else format(tmpstr,20,"...",i);
  314.                                                 AddMenuItem(PreMain8, 0, tmpstr);
  315.                                                 }
  316.                                             }
  317.                                         if(tmpvar >= 80)
  318.                                             {
  319.                                             AddMenuItem(PreMain8, 0, "Next page...");
  320.                                             AddMenuItem(PreMain9, 0, "Previous page...");
  321.                                             for(new i;i<95;i++)
  322.                                                 {
  323.                                                 if(i<=tmpvar && i >= 80 && i < 90)
  324.                                                     {
  325.                                                     if(textdrawactive[i]) format(tmpstr,20,"Textdraw %d",i);
  326.                                                     else format(tmpstr,20,"...",i);
  327.                                                     AddMenuItem(PreMain9, 0, tmpstr);
  328.                                                     }
  329.                                                 }
  330.                                             if(tmpvar >= 90)
  331.                                                 {
  332.                                                 AddMenuItem(PreMain9, 0, "Next page...");
  333.                                                 AddMenuItem(PreMain10, 0, "Previous page...");
  334.                                                 for(new i;i<95;i++)
  335.                                                     {
  336.                                                     if(i<=tmpvar && i >= 90 && i < 100)
  337.                                                         {
  338.                                                         if(textdrawactive[i]) format(tmpstr,20,"Textdraw %d",i);
  339.                                                         else format(tmpstr,20,"...",i);
  340.                                                         AddMenuItem(PreMain10, 0, tmpstr);
  341.                                                         }
  342.                                                     }
  343.                                                 }
  344.                                             }
  345.                                         }
  346.                                     }
  347.                                 }
  348.                             }
  349.                         }
  350.                     }
  351.                 }
  352.             ShowMenuForPlayer(PreMain, playerid);
  353.             TogglePlayerControllable(playerid,0);
  354.             }
  355.         return 1;
  356.     }
  357.     dcmd(edit,4,cmdtext);
  358.     dcmd(moveleft,8,cmdtext);
  359.     dcmd(moveright,9,cmdtext);
  360.     dcmd(moveup,6,cmdtext);
  361.     dcmd(movedown,8,cmdtext);
  362.     dcmd(offsetx,7,cmdtext);
  363.     dcmd(offsety,7,cmdtext);
  364.     dcmd(width,5,cmdtext);
  365.     dcmd(height,6,cmdtext);
  366.     return 0;
  367. }
  368.  
  369. dcmd_offsetx(playerid, params[])
  370. {
  371.     new id, Float:amount;
  372.     if (!sscanf(params, "df", amount)) SendClientMessage(playerid,0x554466AA,"Usage: /offsetx [textdraw id] [x pos(0.0)]");
  373.     else if(writing || movingtext || lettersizing || boxsizing || saving) SendClientMessage(playerid,0x554466AA,"Complete the current operation first");
  374.     else if(!textdrawactive[id])
  375.         {
  376.         SendClientMessage(playerid,0x554466AA,"The selected textdraw isn't avaible for edit, it wasn't created!");
  377.         SendClientMessage(playerid,0x554466AA,"Please use /text if you aren't sure how to use this command.");
  378.         }
  379.     else
  380.         {
  381.         textx[id]=amount;
  382.         UpdateTextDraw(id,1);
  383.         new tmp[256];
  384.         format(tmp,256,"The x position of Textdraw number %d is now %f",id,amount);
  385.         SendClientMessage(playerid,0x554466AA,tmp);
  386.         }
  387.     return 1;
  388. }
  389.  
  390. dcmd_offsety(playerid, params[])
  391. {
  392.     new id, Float:amount;
  393.     if (!sscanf(params, "df", amount)) SendClientMessage(playerid,0x554466AA,"Usage: /offsety [textdraw id] [y pos(0.0)]");
  394.     else if(writing || movingtext || lettersizing || boxsizing || saving) SendClientMessage(playerid,0x554466AA,"Complete the current operation first");
  395.     else if(!textdrawactive[id])
  396.         {
  397.         SendClientMessage(playerid,0x554466AA,"The selected textdraw isn't avaible for edit, it wasn't created!");
  398.         SendClientMessage(playerid,0x554466AA,"Please use /text if you aren't sure how to use this command.");
  399.         }
  400.     else
  401.         {
  402.         texty[id]=amount;
  403.         UpdateTextDraw(id,1);
  404.         new tmp[256];
  405.         format(tmp,256,"The y position of Textdraw number %d is now %f",id,amount);
  406.         SendClientMessage(playerid,0x554466AA,tmp);
  407.         }
  408.     return 1;
  409. }
  410.  
  411. dcmd_moveleft(playerid, params[])
  412. {
  413.     new id, Float:amount;
  414.     if (!sscanf(params, "df", amount)) SendClientMessage(playerid,0x554466AA,"Usage: /moveleft [textdraw id] [amount (0.0)]");
  415.     else if(writing || movingtext || lettersizing || boxsizing || saving) SendClientMessage(playerid,0x554466AA,"Complete the current operation first");
  416.     else if(!textdrawactive[id])
  417.         {
  418.         SendClientMessage(playerid,0x554466AA,"The selected textdraw isn't avaible for edit, it wasn't created!");
  419.         SendClientMessage(playerid,0x554466AA,"Please use /text if you aren't sure how to use this command.");
  420.         }
  421.     else
  422.         {
  423.         textx[id]-=amount;
  424.         UpdateTextDraw(id,1);
  425.         new tmp[256];
  426.         format(tmp,256,"The Textdraw number %d got moved %f units to the left",id,amount);
  427.         SendClientMessage(playerid,0x554466AA,tmp);
  428.         }
  429.     return 1;
  430. }
  431.  
  432. dcmd_moveright(playerid, params[])
  433. {
  434.     new id, Float:amount;
  435.     if (!sscanf(params, "df", amount)) SendClientMessage(playerid,0x554466AA,"Usage: /moveright [textdraw id] [amount (0.0)]");
  436.     else if(writing || movingtext || lettersizing || boxsizing || saving) SendClientMessage(playerid,0x554466AA,"Complete the current operation first");
  437.     else if(!textdrawactive[id])
  438.         {
  439.         SendClientMessage(playerid,0x554466AA,"The selected textdraw isn't avaible for edit, it wasn't created!");
  440.         SendClientMessage(playerid,0x554466AA,"Please use /text if you aren't sure how to use this command.");
  441.         }
  442.     else
  443.         {
  444.         textx[id]+=amount;
  445.         UpdateTextDraw(id,1);
  446.         new tmp[256];
  447.         format(tmp,256,"The Textdraw number %d got moved %f units to the right",id,amount);
  448.         SendClientMessage(playerid,0x554466AA,tmp);
  449.         }
  450.     return 1;
  451. }
  452.  
  453. dcmd_moveup(playerid, params[])
  454. {
  455.     new id, Float:amount;
  456.     if (!sscanf(params, "df", amount)) SendClientMessage(playerid,0x554466AA,"Usage: /moveup [textdraw id] [amount (0.0)]");
  457.     else if(writing || movingtext || lettersizing || boxsizing || saving) SendClientMessage(playerid,0x554466AA,"Complete the current operation first");
  458.     else if(!textdrawactive[id])
  459.         {
  460.         SendClientMessage(playerid,0x554466AA,"The selected textdraw isn't avaible for edit, it wasn't created!");
  461.         SendClientMessage(playerid,0x554466AA,"Please use /text if you aren't sure how to use this command.");
  462.         }
  463.     else
  464.         {
  465.         texty[id]-=amount;
  466.         UpdateTextDraw(id,1);
  467.         new tmp[256];
  468.         format(tmp,256,"The Textdraw number %d got moved %f units to the up",id,amount);
  469.         SendClientMessage(playerid,0x554466AA,tmp);
  470.         }
  471.     return 1;
  472. }
  473.  
  474. dcmd_movedown(playerid, params[])
  475. {
  476.     new id, Float:amount;
  477.     if (!sscanf(params, "df", amount)) SendClientMessage(playerid,0x554466AA,"Usage: /movedown [textdraw id] [amount (0.0)]");
  478.     else if(writing || movingtext || lettersizing || boxsizing || saving) SendClientMessage(playerid,0x554466AA,"Complete the current operation first");
  479.     else if(!textdrawactive[id])
  480.         {
  481.         SendClientMessage(playerid,0x554466AA,"The selected textdraw isn't avaible for edit, it wasn't created!");
  482.         SendClientMessage(playerid,0x554466AA,"Please use /text if you aren't sure how to use this command.");
  483.         }
  484.     else
  485.         {
  486.         texty[id]+=amount;
  487.         UpdateTextDraw(id,1);
  488.         new tmp[256];
  489.         format(tmp,256,"The Textdraw number %d got moved %f units to the down",id,amount);
  490.         SendClientMessage(playerid,0x554466AA,tmp);
  491.         }
  492.     return 1;
  493. }
  494.  
  495. dcmd_width(playerid, params[])
  496. {
  497.     new id, Float:amount;
  498.     if (!sscanf(params, "df", amount)) SendClientMessage(playerid,0x554466AA,"Usage: /width [textdraw id] [amount (0.0)]");
  499.     else if(writing || movingtext || lettersizing || boxsizing || saving) SendClientMessage(playerid,0x554466AA,"Complete the current operation first");
  500.     else if(!textdrawactive[id])
  501.         {
  502.         SendClientMessage(playerid,0x554466AA,"The selected textdraw isn't avaible for edit, it wasn't created!");
  503.         SendClientMessage(playerid,0x554466AA,"Please use /text if you aren't sure how to use this command.");
  504.         }
  505.     else
  506.         {
  507.         lettersizex[id]+=amount;
  508.         UpdateTextDraw(id,0);
  509.         new tmp[256];
  510.         format(tmp,256,"The letter width of Textdraw number %d is now %f",id,amount);
  511.         SendClientMessage(playerid,0x554466AA,tmp);
  512.         }
  513.     return 1;
  514. }
  515.  
  516. dcmd_height(playerid, params[])
  517. {
  518.     new id, Float:amount;
  519.     if (!sscanf(params, "df", amount)) SendClientMessage(playerid,0x554466AA,"Usage: /height [textdraw id] [amount (0.0)]");
  520.     else if(writing || movingtext || lettersizing || boxsizing || saving) SendClientMessage(playerid,0x554466AA,"Complete the current operation first");
  521.     else if(!textdrawactive[id])
  522.         {
  523.         SendClientMessage(playerid,0x554466AA,"The selected textdraw isn't avaible for edit, it wasn't created!");
  524.         SendClientMessage(playerid,0x554466AA,"Please use /text if you aren't sure how to use this command.");
  525.         }
  526.     else
  527.         {
  528.         lettersizey[id]+=amount;
  529.         UpdateTextDraw(id,0);
  530.         new tmp[256];
  531.         format(tmp,256,"The letter height of Textdraw number %d is now %f",id,amount);
  532.         SendClientMessage(playerid,0x554466AA,tmp);
  533.         }
  534.     return 1;
  535. }
  536.  
  537. dcmd_edit(playerid, params[])
  538. {
  539.     new id;
  540.     if (!sscanf(params, "i", id)) SendClientMessage(playerid,0x554466AA,"Usage: /edit [textdraw id]");
  541.     else if(writing || movingtext || lettersizing || boxsizing || saving) SendClientMessage(playerid,0x554466AA,"Complete the current operation first");
  542.     else if(!textdrawactive[id])
  543.         {
  544.         SendClientMessage(playerid,0x554466AA,"The selected textdraw isn't avaible for edit, it wasn't created!");
  545.         SendClientMessage(playerid,0x554466AA,"Please use /text if you aren't sure how to use this command.");
  546.         }
  547.     else
  548.         {
  549.         currtextdraw = id;
  550.         new tmp[256];
  551.         format(tmp,256,"The selected textdraw for edit now is the Textdraw %d",id);
  552.         SendClientMessage(playerid,0x554466AA,tmp);
  553.         menu=0;
  554.         ShowMenuForPlayer(Main,playerid);
  555.         }
  556.     return 1;
  557. }
  558.  
  559. public OnPlayerText(playerid, text[])
  560. {
  561.     if(writing)
  562.         {
  563.         format(textdrawtext[currtextdraw],256,"%s",text);
  564.         TextDrawSetString(Textdraw[currtextdraw],textdrawtext[currtextdraw]);
  565.         TogglePlayerControllable(playerid,1);
  566.         SendClientMessage(playerid,0x554466AA,"Text sucessfully placed!");
  567.         writing = 0;
  568.         return 0;
  569.         }
  570.     if(saving)
  571.         {
  572.         SendClientMessage(playerid,0x554466AA,"Saving proccess started...");
  573.         new tmp[256], str[256], File:gFile;
  574.         format(str,256,"%s.txt",text);
  575.         gFile = fopen(str, io_write);
  576.         format(tmp,256,"//TextDraw developed using Zamaroht's in-game TextDraw system\r\n");
  577.         fwrite(gFile,tmp);
  578.         format(tmp,256," \r\n");
  579.         fwrite(gFile,tmp);
  580.         format(tmp,256,"//On top of script:\r\n");
  581.         fwrite(gFile,tmp);
  582.         for(new i;i<95;i++)
  583.             {
  584.             if(textdrawactive[i])
  585.                 {
  586.                 format(tmp,256,"new Text:Textdraw%d;\r\n",i);
  587.                 fwrite(gFile,tmp);
  588.                 }
  589.             }
  590.         format(tmp,256," \r\n");
  591.         fwrite(gFile,tmp);
  592.         format(tmp,256,"//In OnGameModeInit or any other place, we procced to create our textdraw:\r\n");
  593.         fwrite(gFile,tmp);
  594.         for(new i;i<95;i++)
  595.             {
  596.             if(textdrawactive[i])
  597.                 {
  598.                 format(tmp,256,"Textdraw%d = TextDrawCreate(%f,%f,\"%s\");\r\n",i,textx[i],texty[i],textdrawtext[i]);
  599.                 fwrite(gFile,tmp);
  600.                 }
  601.             }
  602.         for(new i;i<95;i++)
  603.             {
  604.             if(textdrawactive[i])
  605.                 {
  606.                 if(box[i])
  607.                     {
  608.                     format(tmp,256,"TextDrawUseBox(Textdraw%d,%d);\r\n",i,box[i]);
  609.                     fwrite(gFile,tmp);
  610.                     if(boxcolor[i]==red100) format(tmp,256,"TextdrawBoxColor(Textdraw%d,0xff0000ff);\r\n",i);
  611.                     else if(boxcolor[i]==blue100) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0x0000ffff);\r\n",i);
  612.                     else if(boxcolor[i]==green100) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0x00ff00ff);\r\n",i);
  613.                     else if(boxcolor[i]==yellow100) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0xffff00ff);\r\n",i);
  614.                     else if(boxcolor[i]==pink100) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0xff00ffff);\r\n",i);
  615.                     else if(boxcolor[i]==light_blue100) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0x00ffffff);\r\n",i);
  616.                     else if(boxcolor[i]==white100) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0xffffffff);\r\n",i);
  617.                     else if(boxcolor[i]==black100) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0x000000ff);\r\n",i);
  618.                     else if(boxcolor[i]==red80) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0xff0000cc);\r\n",i);
  619.                     else if(boxcolor[i]==blue80) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0x0000ffcc);\r\n",i);
  620.                     else if(boxcolor[i]==green80) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0x00ff00cc);\r\n",i);
  621.                     else if(boxcolor[i]==yellow80) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0xffff00cc);\r\n",i);
  622.                     else if(boxcolor[i]==pink80) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0xff00ffcc);\r\n",i);
  623.                     else if(boxcolor[i]==light_blue80) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0x00ffffcc);\r\n",i);
  624.                     else if(boxcolor[i]==white80) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0xffffffcc);\r\n",i);
  625.                     else if(boxcolor[i]==black80) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0x000000cc);\r\n",i);
  626.                     else if(boxcolor[i]==red60) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0xff000099);\r\n",i);
  627.                     else if(boxcolor[i]==blue60) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0x0000ff99);\r\n",i);
  628.                     else if(boxcolor[i]==green60) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0x00ff0099);\r\n",i);
  629.                     else if(boxcolor[i]==yellow60) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0xffff0099);\r\n",i);
  630.                     else if(boxcolor[i]==pink60) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0xff00ff99);\r\n",i);
  631.                     else if(boxcolor[i]==light_blue60) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0x00ffff99);\r\n",i);
  632.                     else if(boxcolor[i]==white60) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0xffffff99);\r\n",i);
  633.                     else if(boxcolor[i]==black60) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0x00000099);\r\n",i);
  634.                     else if(boxcolor[i]==red40) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0xff000066);\r\n",i);
  635.                     else if(boxcolor[i]==blue40) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0x0000ff66);\r\n",i);
  636.                     else if(boxcolor[i]==green40) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0x00ff0066);\r\n",i);
  637.                     else if(boxcolor[i]==yellow40) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0xffff0066);\r\n",i);
  638.                     else if(boxcolor[i]==pink40) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0xff00ff66);\r\n",i);
  639.                     else if(boxcolor[i]==light_blue40) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0x00ffff66);\r\n",i);
  640.                     else if(boxcolor[i]==white40) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0xffffff66);\r\n",i);
  641.                     else if(boxcolor[i]==black40) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0x00000066);\r\n",i);
  642.                     else if(boxcolor[i]==red20) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0xff000033);\r\n",i);
  643.                     else if(boxcolor[i]==blue20) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0x0000ff33);\r\n",i);
  644.                     else if(boxcolor[i]==green20) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0x00ff0033);\r\n",i);
  645.                     else if(boxcolor[i]==yellow20) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0xffff0033);\r\n",i);
  646.                     else if(boxcolor[i]==pink20) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0xff00ff33);\r\n",i);
  647.                     else if(boxcolor[i]==light_blue20) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0x00ffff33);\r\n",i);
  648.                     else if(boxcolor[i]==white20) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0xffffff33);\r\n",i);
  649.                     else if(boxcolor[i]==black20) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0x00000033);\r\n",i);
  650.                     else if(boxcolor[i]==red0) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0xff000000);\r\n",i);
  651.                     else if(boxcolor[i]==blue0) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0x0000ff00);\r\n",i);
  652.                     else if(boxcolor[i]==green0) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0x00ff0000);\r\n",i);
  653.                     else if(boxcolor[i]==yellow0) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0xffff0000);\r\n",i);
  654.                     else if(boxcolor[i]==pink0) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0xff00ff00);\r\n",i);
  655.                     else if(boxcolor[i]==light_blue0) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0x00ffff00);\r\n",i);
  656.                     else if(boxcolor[i]==white0) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0xffffff00);\r\n",i);
  657.                     else if(boxcolor[i]==black0) format(tmp,256,"TextDrawBoxColor(Textdraw%d,0x00000000);\r\n",i);
  658.                     fwrite(gFile,tmp);
  659.                     format(tmp,256,"TextDrawTextSize(Textdraw%d,%f,%f);\r\n",i,boxsizex[i],boxsizey[i]);
  660.                     fwrite(gFile,tmp);
  661.                     }
  662.                 }
  663.             }
  664.         for(new i;i<95;i++)
  665.             {
  666.             if(textdrawactive[i])
  667.                 {
  668.                 format(tmp,256,"TextDrawAlignment(Textdraw%d,%d);\r\n",i,alignment[i]);
  669.                 fwrite(gFile,tmp);
  670.                 }
  671.             }
  672.         for(new i;i<95;i++)
  673.             {
  674.             if(textdrawactive[i])
  675.                 {
  676.                 if(backcolor[i]==red100) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0xff0000ff);\r\n",i);
  677.                 else if(backcolor[i]==blue100) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0x0000ffff);\r\n",i);
  678.                 else if(backcolor[i]==green100) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0x00ff00ff);\r\n",i);
  679.                 else if(backcolor[i]==yellow100) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0xffff00ff);\r\n",i);
  680.                 else if(backcolor[i]==pink100) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0xff00ffff);\r\n",i);
  681.                 else if(backcolor[i]==light_blue100) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0x00ffffff);\r\n",i);
  682.                 else if(backcolor[i]==white100) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0xffffffff);\r\n",i);
  683.                 else if(backcolor[i]==black100) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0x000000ff);\r\n",i);
  684.                 else if(backcolor[i]==red80) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0xff0000cc);\r\n",i);
  685.                 else if(backcolor[i]==blue80) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0x0000ffcc);\r\n",i);
  686.                 else if(backcolor[i]==green80) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0x00ff00cc);\r\n",i);
  687.                 else if(backcolor[i]==yellow80) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0xffff00cc);\r\n",i);
  688.                 else if(backcolor[i]==pink80) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0xff00ffcc);\r\n",i);
  689.                 else if(backcolor[i]==light_blue80) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0x00ffffcc);\r\n",i);
  690.                 else if(backcolor[i]==white80) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0xffffffcc);\r\n",i);
  691.                 else if(backcolor[i]==black80) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0x000000cc);\r\n",i);
  692.                 else if(backcolor[i]==red60) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0xff000099);\r\n",i);
  693.                 else if(backcolor[i]==blue60) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0x0000ff99);\r\n",i);
  694.                 else if(backcolor[i]==green60) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0x00ff0099);\r\n",i);
  695.                 else if(backcolor[i]==yellow60) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0xffff0099);\r\n",i);
  696.                 else if(backcolor[i]==pink60) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0xff00ff99);\r\n",i);
  697.                 else if(backcolor[i]==light_blue60) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0x00ffff99);\r\n",i);
  698.                 else if(backcolor[i]==white60) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0xffffff99);\r\n",i);
  699.                 else if(backcolor[i]==black60) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0x00000099);\r\n",i);
  700.                 else if(backcolor[i]==red40) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0xff000066);\r\n",i);
  701.                 else if(backcolor[i]==blue40) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0x0000ff66);\r\n",i);
  702.                 else if(backcolor[i]==green40) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0x00ff0066);\r\n",i);
  703.                 else if(backcolor[i]==yellow40) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0xffff0066);\r\n",i);
  704.                 else if(backcolor[i]==pink40) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0xff00ff66);\r\n",i);
  705.                 else if(backcolor[i]==light_blue40) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0x00ffff66);\r\n",i);
  706.                 else if(backcolor[i]==white40) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0xffffff66);\r\n",i);
  707.                 else if(backcolor[i]==black40) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0x00000066);\r\n",i);
  708.                 else if(backcolor[i]==red20) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0xff000033);\r\n",i);
  709.                 else if(backcolor[i]==blue20) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0x0000ff33);\r\n",i);
  710.                 else if(backcolor[i]==green20) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0x00ff0033);\r\n",i);
  711.                 else if(backcolor[i]==yellow20) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0xffff0033);\r\n",i);
  712.                 else if(backcolor[i]==pink20) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0xff00ff33);\r\n",i);
  713.                 else if(backcolor[i]==light_blue20) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0x00ffff33);\r\n",i);
  714.                 else if(backcolor[i]==white20) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0xffffff33);\r\n",i);
  715.                 else if(backcolor[i]==black20) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0x00000033);\r\n",i);
  716.                 else if(backcolor[i]==red0) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0xff000000);\r\n",i);
  717.                 else if(backcolor[i]==blue0) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0x0000ff00);\r\n",i);
  718.                 else if(backcolor[i]==green0) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0x00ff0000);\r\n",i);
  719.                 else if(backcolor[i]==yellow0) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0xffff0000);\r\n",i);
  720.                 else if(backcolor[i]==pink0) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0xff00ff00);\r\n",i);
  721.                 else if(backcolor[i]==light_blue0) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0x00ffff00);\r\n",i);
  722.                 else if(backcolor[i]==white0) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0xffffff00);\r\n",i);
  723.                 else if(backcolor[i]==black0) format(tmp,256,"TextDrawBackgroundColor(Textdraw%d,0x00000000);\r\n",i);
  724.                 fwrite(gFile,tmp);
  725.                 }
  726.             }
  727.         for(new i;i<95;i++)
  728.             {
  729.             if(textdrawactive[i])
  730.                 {
  731.                 format(tmp,256,"TextDrawFont(Textdraw%d,%d);\r\n",i,font[i]);
  732.                 fwrite(gFile,tmp);
  733.                 format(tmp,256,"TextDrawLetterSize(Textdraw%d,%f,%f);\r\n",i,lettersizex[i],lettersizey[i]);
  734.                 fwrite(gFile,tmp);
  735.                 }
  736.             }
  737.         for(new i;i<95;i++)
  738.             {
  739.             if(textdrawactive[i])
  740.                 {
  741.                 if(textcolor[i]==red100) format(tmp,256,"TextDrawColor(Textdraw%d,0xff0000ff);\r\n",i);
  742.                 else if(textcolor[i]==blue100) format(tmp,256,"TextDrawColor(Textdraw%d,0x0000ffff);\r\n",i);
  743.                 else if(textcolor[i]==green100) format(tmp,256,"TextDrawColor(Textdraw%d,0x00ff00ff);\r\n",i);
  744.                 else if(textcolor[i]==yellow100) format(tmp,256,"TextDrawColor(Textdraw%d,0xffff00ff);\r\n",i);
  745.                 else if(textcolor[i]==pink100) format(tmp,256,"TextDrawColor(Textdraw%d,0xff00ffff);\r\n",i);
  746.                 else if(textcolor[i]==light_blue100) format(tmp,256,"TextDrawColor(Textdraw%d,0x00ffffff);\r\n",i);
  747.                 else if(textcolor[i]==white100) format(tmp,256,"TextDrawColor(Textdraw%d,0xffffffff);\r\n",i);
  748.                 else if(textcolor[i]==black100) format(tmp,256,"TextDrawColor(Textdraw%d,0x000000ff);\r\n",i);
  749.                 else if(textcolor[i]==red80) format(tmp,256,"TextDrawColor(Textdraw%d,0xff0000cc);\r\n",i);
  750.                 else if(textcolor[i]==blue80) format(tmp,256,"TextDrawColor(Textdraw%d,0x0000ffcc);\r\n",i);
  751.                 else if(textcolor[i]==green80) format(tmp,256,"TextDrawColor(Textdraw%d,0x00ff00cc);\r\n",i);
  752.                 else if(textcolor[i]==yellow80) format(tmp,256,"TextDrawColor(Textdraw%d,0xffff00cc);\r\n",i);
  753.                 else if(textcolor[i]==pink80) format(tmp,256,"TextDrawColor(Textdraw%d,0xff00ffcc);\r\n",i);
  754.                 else if(textcolor[i]==light_blue80) format(tmp,256,"TextDrawColor(Textdraw%d,0x00ffffcc);\r\n",i);
  755.                 else if(textcolor[i]==white80) format(tmp,256,"TextDrawColor(Textdraw%d,0xffffffcc);\r\n",i);
  756.                 else if(textcolor[i]==black80) format(tmp,256,"TextDrawColor(Textdraw%d,0x000000cc);\r\n",i);
  757.                 else if(textcolor[i]==red60) format(tmp,256,"TextDrawColor(Textdraw%d,0xff000099);\r\n",i);
  758.                 else if(textcolor[i]==blue60) format(tmp,256,"TextDrawColor(Textdraw%d,0x0000ff99);\r\n",i);
  759.                 else if(textcolor[i]==green60) format(tmp,256,"TextDrawColor(Textdraw%d,0x00ff0099);\r\n",i);
  760.                 else if(textcolor[i]==yellow60) format(tmp,256,"TextDrawColor(Textdraw%d,0xffff0099);\r\n",i);
  761.                 else if(textcolor[i]==pink60) format(tmp,256,"TextDrawColor(Textdraw%d,0xff00ff99);\r\n",i);
  762.                 else if(textcolor[i]==light_blue60) format(tmp,256,"TextDrawColor(Textdraw%d,0x00ffff99);\r\n",i);
  763.                 else if(textcolor[i]==white60) format(tmp,256,"TextDrawColor(Textdraw%d,0xffffff99);\r\n",i);
  764.                 else if(textcolor[i]==black60) format(tmp,256,"TextDrawColor(Textdraw%d,0x00000099);\r\n",i);
  765.                 else if(textcolor[i]==red40) format(tmp,256,"TextDrawColor(Textdraw%d,0xff000066);\r\n",i);
  766.                 else if(textcolor[i]==blue40) format(tmp,256,"TextDrawColor(Textdraw%d,0x0000ff66);\r\n",i);
  767.                 else if(textcolor[i]==green40) format(tmp,256,"TextDrawColor(Textdraw%d,0x00ff0066);\r\n",i);
  768.                 else if(textcolor[i]==yellow40) format(tmp,256,"TextDrawColor(Textdraw%d,0xffff0066);\r\n",i);
  769.                 else if(textcolor[i]==pink40) format(tmp,256,"TextDrawColor(Textdraw%d,0xff00ff66);\r\n",i);
  770.                 else if(textcolor[i]==light_blue40) format(tmp,256,"TextDrawColor(Textdraw%d,0x00ffff66);\r\n",i);
  771.                 else if(textcolor[i]==white40) format(tmp,256,"TextDrawColor(Textdraw%d,0xffffff66);\r\n",i);
  772.                 else if(textcolor[i]==black40) format(tmp,256,"TextDrawColor(Textdraw%d,0x00000066);\r\n",i);
  773.                 else if(textcolor[i]==red20) format(tmp,256,"TextDrawColor(Textdraw%d,0xff000033);\r\n",i);
  774.                 else if(textcolor[i]==blue20) format(tmp,256,"TextDrawColor(Textdraw%d,0x0000ff33);\r\n",i);
  775.                 else if(textcolor[i]==green20) format(tmp,256,"TextDrawColor(Textdraw%d,0x00ff0033);\r\n",i);
  776.                 else if(textcolor[i]==yellow20) format(tmp,256,"TextDrawColor(Textdraw%d,0xffff0033);\r\n",i);
  777.                 else if(textcolor[i]==pink20) format(tmp,256,"TextDrawColor(Textdraw%d,0xff00ff33);\r\n",i);
  778.                 else if(textcolor[i]==light_blue20) format(tmp,256,"TextDrawColor(Textdraw%d,0x00ffff33);\r\n",i);
  779.                 else if(textcolor[i]==white20) format(tmp,256,"TextDrawColor(Textdraw%d,0xffffff33);\r\n",i);
  780.                 else if(textcolor[i]==black20) format(tmp,256,"TextDrawColor(Textdraw%d,0x00000033);\r\n",i);
  781.                 else if(textcolor[i]==red0) format(tmp,256,"TextDrawColor(Textdraw%d,0xff000000);\r\n",i);
  782.                 else if(textcolor[i]==blue0) format(tmp,256,"TextDrawColor(Textdraw%d,0x0000ff00);\r\n",i);
  783.                 else if(textcolor[i]==green0) format(tmp,256,"TextDrawColor(Textdraw%d,0x00ff0000);\r\n",i);
  784.                 else if(textcolor[i]==yellow0) format(tmp,256,"TextDrawColor(Textdraw%d,0xffff0000);\r\n",i);
  785.                 else if(textcolor[i]==pink0) format(tmp,256,"TextDrawColor(Textdraw%d,0xff00ff00);\r\n",i);
  786.                 else if(textcolor[i]==light_blue0) format(tmp,256,"TextDrawColor(Textdraw%d,0x00ffff00);\r\n",i);
  787.                 else if(textcolor[i]==white0) format(tmp,256,"TextDrawColor(Textdraw%d,0xffffff00);\r\n",i);
  788.                 else if(textcolor[i]==black0) format(tmp,256,"TextDrawColor(Textdraw%d,0x00000000);\r\n",i);
  789.                 fwrite(gFile,tmp);
  790.                 }
  791.             }
  792.         for(new i;i<95;i++)
  793.             {
  794.             if(textdrawactive[i])
  795.                 {
  796.                 if(outline[i])
  797.                     {
  798.                     format(tmp,256,"TextDrawSetOutline(Textdraw%d,%d);\r\n",i,outline[i]);
  799.                     fwrite(gFile,tmp);
  800.                     }
  801.                 }
  802.             }
  803.         for(new i;i<95;i++)
  804.             {
  805.             if(textdrawactive[i])
  806.                 {
  807.                 if(proportional[i])
  808.                     {
  809.                     format(tmp,256,"TextDrawSetProportional(Textdraw%d,%d);\r\n",i,proportional[i]);
  810.                     fwrite(gFile,tmp);
  811.                     }
  812.                 }
  813.             }
  814.         for(new i;i<95;i++)
  815.             {
  816.             if(textdrawactive[i])
  817.                 {
  818.                 if(shadow[i])
  819.                     {
  820.                     format(tmp,256,"TextDrawSetShadow(Textdraw%d,%d);\r\n",i,shadow[i]);
  821.                     fwrite(gFile,tmp);
  822.                     }
  823.                 }
  824.             }
  825.         format(tmp,256," \r\n");
  826.         fwrite(gFile,tmp);
  827.         format(tmp,256,"//You can now use TextDrawShowForPlayer(-ForAll), TextDrawHideForPlayer(-ForAll) and\r\n");
  828.         fwrite(gFile,tmp);
  829.         format(tmp,256,"//TextDrawDestroy functions to show, hide, and destroy the textdraw.\r\n");
  830.         fwrite(gFile,tmp);
  831.         format(tmp,256," \r\n");
  832.         fwrite(gFile,tmp);
  833.         fwrite(gFile,tmp);
  834.         fclose(gFile);
  835.         TogglePlayerControllable(playerid,1);
  836.         new str2[256];
  837.         format(str2,256,"TextDraw successfully saved on file '%s'",str);
  838.         SendClientMessage(playerid,0x554466AA,str2);
  839.         TogglePlayerControllable(playerid,1);
  840.         saving=0;
  841.         return 0;
  842.         }
  843.     return 1;
  844. }
  845.  
  846. public OnPlayerSelectedMenuRow(playerid, row)
  847. {
  848.     if(menu >= 100 && menu <= 109)
  849.         {
  850.         switch(row)
  851.             {
  852.             case 0:
  853.                 {
  854.                 if(menu==100)
  855.                     {
  856.                     new tmp;
  857.                     for(new i;i<95;i++)
  858.                         {
  859.                         if(!textdrawactive[i])
  860.                             {
  861.                             tmp=i;
  862.                             i+=100;
  863.                             }
  864.                         }
  865.                     textdrawactive[tmp]=1;
  866.                     currtextdraw=tmp;
  867.                     ShowMenuForPlayer(Main,playerid);
  868.                     TextDrawShowForAll(Textdraw[tmp]);
  869.                     menu=0;
  870.                     }
  871.                 else
  872.                     {
  873.                     if(menu==101) ShowMenuForPlayer(PreMain,playerid);
  874.                     if(menu==102) ShowMenuForPlayer(PreMain2,playerid);
  875.                     if(menu==103) ShowMenuForPlayer(PreMain3,playerid);
  876.                     if(menu==104) ShowMenuForPlayer(PreMain4,playerid);
  877.                     if(menu==105) ShowMenuForPlayer(PreMain5,playerid);
  878.                     if(menu==106) ShowMenuForPlayer(PreMain6,playerid);
  879.                     if(menu==107) ShowMenuForPlayer(PreMain7,playerid);
  880.                     if(menu==108) ShowMenuForPlayer(PreMain8,playerid);
  881.                     if(menu==109) ShowMenuForPlayer(PreMain9,playerid);
  882.                     menu--;
  883.                     }
  884.                 }
  885.             case 11:
  886.                 {
  887.                 if(menu==100) ShowMenuForPlayer(PreMain2,playerid);
  888.                 if(menu==101) ShowMenuForPlayer(PreMain3,playerid);
  889.                 if(menu==102) ShowMenuForPlayer(PreMain4,playerid);
  890.                 if(menu==103) ShowMenuForPlayer(PreMain5,playerid);
  891.                 if(menu==104) ShowMenuForPlayer(PreMain6,playerid);
  892.                 if(menu==105) ShowMenuForPlayer(PreMain7,playerid);
  893.                 if(menu==106) ShowMenuForPlayer(PreMain8,playerid);
  894.                 if(menu==107) ShowMenuForPlayer(PreMain9,playerid);
  895.                 if(menu==108) ShowMenuForPlayer(PreMain10,playerid);
  896.                 menu++;
  897.                 }
  898.             default:
  899.                 {
  900.                 if(textdrawactive[(menu-100)*10+row-1])
  901.                     {
  902.                     currtextdraw=(menu-100)*10+row-1;
  903.                     ShowMenuForPlayer(Main,playerid);
  904.                     menu=0;
  905.                     }
  906.                 else
  907.                     {
  908.                     SendClientMessage(playerid,0x554466AA,"The selected Textdraw isn't created, please select again");
  909.                     TogglePlayerControllable(playerid,1);
  910.                     }
  911.                 }
  912.             }
  913.         if(IsValidMenu(PreMain)) DestroyMenu(PreMain);
  914.         if(IsValidMenu(PreMain2)) DestroyMenu(PreMain2);
  915.         if(IsValidMenu(PreMain3)) DestroyMenu(PreMain3);
  916.         if(IsValidMenu(PreMain4)) DestroyMenu(PreMain4);
  917.         if(IsValidMenu(PreMain5)) DestroyMenu(PreMain5);
  918.         if(IsValidMenu(PreMain6)) DestroyMenu(PreMain6);
  919.         if(IsValidMenu(PreMain7)) DestroyMenu(PreMain7);
  920.         if(IsValidMenu(PreMain8)) DestroyMenu(PreMain8);
  921.         if(IsValidMenu(PreMain9)) DestroyMenu(PreMain9);
  922.         if(IsValidMenu(PreMain10)) DestroyMenu(PreMain10);
  923.         }
  924.     else if(menu==0)
  925.         {
  926.         switch(row)
  927.             {
  928.             case 0:
  929.                 {
  930.                 SendClientMessage(playerid,0x554466AA,"Press T or F6, write the text and press enter");
  931.                 writing=1;
  932.                 }
  933.             case 1:
  934.                 {
  935.                 SendClientMessage(playerid,0x554466AA,"Use 'Crouch'(-y), 'Jump'(+y), 'Look Behind'(-x) and 'Walk'(+x) keys to move it");
  936.                 SendClientMessage(playerid,0x554466AA,"(+ Sprint Key to move faster), TAB to finish");
  937.                 movingtext=1;
  938.                 }
  939.             case 2:
  940.                 {
  941.                 SendClientMessage(playerid,0x554466AA,"Use 'Crouch'(-y), 'Jump'(+y), 'Look Behind'(-x) and 'Walk'(+x) keys to change it");
  942.                 SendClientMessage(playerid,0x554466AA,"(+ Sprint Key to change faster), TAB to finish");
  943.                 lettersizing=1;
  944.                 }
  945.             case 3:
  946.                 {
  947.                 ShowMenuForPlayer(AlignmentM,playerid);
  948.                 menu = 1;
  949.                 }
  950.             case 4:
  951.                 {
  952.                 ShowMenuForPlayer(ColorM,playerid);
  953.                 menu = 2;
  954.                 }
  955.             case 5:
  956.                 {
  957.                 ShowMenuForPlayer(Box1M,playerid);
  958.                 menu = 4;
  959.  
  960.                 }
  961.             case 6:
  962.                 {
  963.                 ShowMenuForPlayer(ColorM,playerid);
  964.                 menu = 7;
  965.                 }
  966.             case 7:
  967.                 {
  968.                 ShowMenuForPlayer(ShadowM,playerid);
  969.                 menu = 9;
  970.                 }
  971.             case 8:
  972.                 {
  973.                 ShowMenuForPlayer(ProportionalM,playerid);
  974.                 menu = 10;
  975.                 }
  976.             case 9:
  977.                 {
  978.                 ShowMenuForPlayer(FontM,playerid);
  979.                 menu = 11;
  980.                 }
  981.             case 10:
  982.                 {
  983.                 ShowMenuForPlayer(OutlineM,playerid);
  984.                 menu = 12;
  985.                 }
  986.             case 11:
  987.                 {
  988.                 ShowMenuForPlayer(Main2,playerid);
  989.                 menu = 20;
  990.                 }
  991.             }
  992.         }
  993.     else if(menu==20)
  994.         {
  995.         switch(row)
  996.             {
  997.             case 0:
  998.                 {
  999.                 ShowMenuForPlayer(Main,playerid);
  1000.                 menu = 0;
  1001.                 }
  1002.             case 1:
  1003.                 {
  1004.                 SendClientMessage(playerid,0x554466AA,"Now write a name for the file, which will be saved on scriptfiles folder with .txt extension");
  1005.                 SendClientMessage(playerid,0x554466AA,"automatly added. If the file already exists, it will be overwrited without warning.");
  1006.                 saving=1;
  1007.                 }
  1008.             case 2:
  1009.                 {
  1010.                 textdrawactive[currtextdraw]=0;
  1011.                 TextDrawHideForAll(Textdraw[currtextdraw]);
  1012.                 textdrawtext[currtextdraw] = " ";
  1013.                 textx[currtextdraw] = 1.0;
  1014.                 texty[currtextdraw] = 1.0;
  1015.                 lettersizex[currtextdraw] = 1.0;
  1016.                 lettersizey[currtextdraw] = 1.0;
  1017.                 boxsizex[currtextdraw] = 0.0;
  1018.                 boxsizey[currtextdraw] = 0.0;
  1019.                 alignment[currtextdraw]= 0;
  1020.                 box[currtextdraw] = 0;
  1021.                 boxcolor[currtextdraw] = 0x000000FF;
  1022.                 backcolor[currtextdraw] = 0x000000FF;
  1023.                 proportional[currtextdraw] = 1;
  1024.                 font[currtextdraw] = 3;
  1025.                 shadow[currtextdraw] = 1;
  1026.                 outline[currtextdraw] = 1;
  1027.                 textcolor[currtextdraw] = 0xFFFFFFFF;
  1028.                 HideMenuForPlayer(Main,playerid);
  1029.                 SendClientMessage(playerid,0x554466AA,"Textdraw deleted.");
  1030.                 TogglePlayerControllable(playerid,1);
  1031.                 }
  1032.             }
  1033.         }
  1034.     else if(menu==1)
  1035.         {
  1036.         switch(row)
  1037.             {
  1038.             case 0:
  1039.                 {
  1040.                 alignment[currtextdraw]=0;
  1041.                 TextDrawAlignment(Textdraw[currtextdraw], 0);
  1042.                 menu=0;
  1043.                 TogglePlayerControllable(playerid,1);
  1044.                 SendClientMessage(playerid,0x554466AA,"Done");
  1045.                 }
  1046.             case 1:
  1047.                 {
  1048.                 alignment[currtextdraw]=1;
  1049.                 TextDrawAlignment(Textdraw[currtextdraw], 1);
  1050.                 menu=0;
  1051.                 TogglePlayerControllable(playerid,1);
  1052.                 SendClientMessage(playerid,0x554466AA,"Done");
  1053.                 }
  1054.             case 2:
  1055.                 {
  1056.                 alignment[currtextdraw]=2;
  1057.                 TextDrawAlignment(Textdraw[currtextdraw], 2);
  1058.                 menu=0;
  1059.                 TogglePlayerControllable(playerid,1);
  1060.                 SendClientMessage(playerid,0x554466AA,"Done");
  1061.                 }
  1062.             case 3:
  1063.                 {
  1064.                 alignment[currtextdraw]=3;
  1065.                 TextDrawAlignment(Textdraw[currtextdraw], 3);
  1066.                 menu=0;
  1067.                 TogglePlayerControllable(playerid,1);
  1068.                 SendClientMessage(playerid,0x554466AA,"Done");
  1069.                 }
  1070.             }
  1071.         }
  1072.     else if(menu==2)
  1073.         {
  1074.         switch(row)
  1075.             {
  1076.             case 0:
  1077.                 {
  1078.                 color=red;
  1079.                 ShowMenuForPlayer(TransparencyM, playerid);
  1080.                 menu=3;
  1081.                 }
  1082.             case 1:
  1083.                 {
  1084.                 color=blue;
  1085.                 ShowMenuForPlayer(TransparencyM, playerid);
  1086.                 menu=3;
  1087.                 }
  1088.             case 2:
  1089.                 {
  1090.                 color=green;
  1091.                 ShowMenuForPlayer(TransparencyM, playerid);
  1092.                 menu=3;
  1093.                 }
  1094.             case 3:
  1095.                 {
  1096.                 color=yellow;
  1097.                 ShowMenuForPlayer(TransparencyM, playerid);
  1098.                 menu=3;
  1099.                 }
  1100.             case 4:
  1101.                 {
  1102.                 color=pink;
  1103.                 ShowMenuForPlayer(TransparencyM, playerid);
  1104.                 menu=3;
  1105.                 }
  1106.             case 5:
  1107.                 {
  1108.                 color=light_blue;
  1109.                 ShowMenuForPlayer(TransparencyM, playerid);
  1110.                 menu=3;
  1111.                 }
  1112.             case 6:
  1113.                 {
  1114.                 color=white;
  1115.                 ShowMenuForPlayer(TransparencyM, playerid);
  1116.                 menu=3;
  1117.                 }
  1118.             case 7:
  1119.                 {
  1120.                 color=black;
  1121.                 ShowMenuForPlayer(TransparencyM, playerid);
  1122.                 menu=3;
  1123.                 }
  1124.             }
  1125.         }
  1126.     else if(menu==3)
  1127.         {
  1128.         switch(row)
  1129.             {
  1130.             case 0:
  1131.                 {
  1132.                 switch(color)
  1133.                     {
  1134.                     case red: textcolor[currtextdraw]=red100;
  1135.                     case blue: textcolor[currtextdraw]=blue100;
  1136.                     case green: textcolor[currtextdraw]=green100;
  1137.                     case yellow: textcolor[currtextdraw]=yellow100;
  1138.                     case pink: textcolor[currtextdraw]=pink100;
  1139.                     case light_blue: textcolor[currtextdraw]=light_blue100;
  1140.                     case white: textcolor[currtextdraw]=white100;
  1141.                     case black: textcolor[currtextdraw]=black100;
  1142.                     }
  1143.                 }
  1144.             case 1:
  1145.                 {
  1146.                 switch(color)
  1147.                     {
  1148.                     case red: textcolor[currtextdraw]=red80;
  1149.                     case blue: textcolor[currtextdraw]=blue80;
  1150.                     case green: textcolor[currtextdraw]=green80;
  1151.                     case yellow: textcolor[currtextdraw]=yellow80;
  1152.                     case pink: textcolor[currtextdraw]=pink80;
  1153.                     case light_blue: textcolor[currtextdraw]=light_blue80;
  1154.                     case white: textcolor[currtextdraw]=white80;
  1155.                     case black: textcolor[currtextdraw]=black80;
  1156.                     }
  1157.                 }
  1158.             case 2:
  1159.                 {
  1160.                 switch(color)
  1161.                     {
  1162.                     case red: textcolor[currtextdraw]=red60;
  1163.                     case blue: textcolor[currtextdraw]=blue60;
  1164.                     case green: textcolor[currtextdraw]=green60;
  1165.                     case yellow: textcolor[currtextdraw]=yellow60;
  1166.                     case pink: textcolor[currtextdraw]=pink60;
  1167.                     case light_blue: textcolor[currtextdraw]=light_blue60;
  1168.                     case white: textcolor[currtextdraw]=white60;
  1169.                     case black: textcolor[currtextdraw]=black60;
  1170.                     }
  1171.                 }
  1172.             case 3:
  1173.                 {
  1174.                 switch(color)
  1175.                     {
  1176.                     case red: textcolor[currtextdraw]=red40;
  1177.                     case blue: textcolor[currtextdraw]=blue40;
  1178.                     case green: textcolor[currtextdraw]=green40;
  1179.                     case yellow: textcolor[currtextdraw]=yellow40;
  1180.                     case pink: textcolor[currtextdraw]=pink40;
  1181.                     case light_blue: textcolor[currtextdraw]=light_blue40;
  1182.                     case white: textcolor[currtextdraw]=white40;
  1183.                     case black: textcolor[currtextdraw]=black40;
  1184.                     }
  1185.                 }
  1186.             case 4:
  1187.                 {
  1188.                 switch(color)
  1189.                     {
  1190.                     case red: textcolor[currtextdraw]=red20;
  1191.                     case blue: textcolor[currtextdraw]=blue20;
  1192.                     case green: textcolor[currtextdraw]=green20;
  1193.                     case yellow: textcolor[currtextdraw]=yellow20;
  1194.                     case pink: textcolor[currtextdraw]=pink20;
  1195.                     case light_blue: textcolor[currtextdraw]=light_blue20;
  1196.                     case white: textcolor[currtextdraw]=white20;
  1197.                     case black: textcolor[currtextdraw]=black20;
  1198.                     }
  1199.                 }
  1200.             case 5:
  1201.                 {
  1202.                 switch(color)
  1203.                     {
  1204.                     case red: textcolor[currtextdraw]=red0;
  1205.                     case blue: textcolor[currtextdraw]=blue0;
  1206.                     case green: textcolor[currtextdraw]=green0;
  1207.                     case yellow: textcolor[currtextdraw]=yellow0;
  1208.                     case pink: textcolor[currtextdraw]=pink0;
  1209.                     case light_blue: textcolor[currtextdraw]=light_blue0;
  1210.                     case white: textcolor[currtextdraw]=white0;
  1211.                     case black: textcolor[currtextdraw]=black0;
  1212.                     }
  1213.                 }
  1214.             }
  1215.         UpdateTextDraw(currtextdraw,0);
  1216.         TogglePlayerControllable(playerid,1);
  1217.         menu=0;
  1218.         SendClientMessage(playerid,0x554466AA,"Color Applied");
  1219.         }
  1220.     else if(menu==4)
  1221.         {
  1222.         switch(row)
  1223.             {
  1224.             case 0:
  1225.                 {
  1226.                 box[currtextdraw]=1;
  1227.                 UpdateTextDraw(currtextdraw,0);
  1228.                 SendClientMessage(playerid,0x554466AA,"Use 'Crouch'(-y), 'Jump'(+y), 'Look Behind'(-x) and 'Walk'(+x) keys to change the box size");
  1229.                 SendClientMessage(playerid,0x554466AA,"(+ Sprint Key to move faster), TAB to finish");
  1230.                 boxsizing=1;
  1231.                 }
  1232.             case 1:
  1233.                 {
  1234.                 box[currtextdraw]=0;
  1235.                 UpdateTextDraw(currtextdraw,0);
  1236.                 TogglePlayerControllable(playerid,1);
  1237.                 menu=0;
  1238.                 SendClientMessage(playerid,0x554466AA,"Box disabled");
  1239.                 }
  1240.             }
  1241.         }
  1242.     else if(menu==5)
  1243.         {
  1244.         switch(row)
  1245.             {
  1246.             case 0:
  1247.                 {
  1248.                 color=red;
  1249.                 ShowMenuForPlayer(TransparencyM, playerid);
  1250.                 menu=6;
  1251.                 }
  1252.             case 1:
  1253.                 {
  1254.                 color=blue;
  1255.                 ShowMenuForPlayer(TransparencyM, playerid);
  1256.                 menu=6;
  1257.                 }
  1258.             case 2:
  1259.                 {
  1260.                 color=green;
  1261.                 ShowMenuForPlayer(TransparencyM, playerid);
  1262.                 menu=6;
  1263.                 }
  1264.             case 3:
  1265.                 {
  1266.                 color=yellow;
  1267.                 ShowMenuForPlayer(TransparencyM, playerid);
  1268.                 menu=6;
  1269.                 }
  1270.             case 4:
  1271.                 {
  1272.                 color=pink;
  1273.                 ShowMenuForPlayer(TransparencyM, playerid);
  1274.                 menu=6;
  1275.                 }
  1276.             case 5:
  1277.                 {
  1278.                 color=light_blue;
  1279.                 ShowMenuForPlayer(TransparencyM, playerid);
  1280.                 menu=6;
  1281.                 }
  1282.             case 6:
  1283.                 {
  1284.                 color=white;
  1285.                 ShowMenuForPlayer(TransparencyM, playerid);
  1286.                 menu=6;
  1287.                 }
  1288.             case 7:
  1289.                 {
  1290.                 color=black;
  1291.                 ShowMenuForPlayer(TransparencyM, playerid);
  1292.                 menu=6;
  1293.                 }
  1294.             }
  1295.         }
  1296.     else if(menu==6)
  1297.         {
  1298.         switch(row)
  1299.             {
  1300.             case 0:
  1301.                 {
  1302.                 switch(color)
  1303.                     {
  1304.                     case red: boxcolor[currtextdraw]=red100;
  1305.                     case blue: boxcolor[currtextdraw]=blue100;
  1306.                     case green: boxcolor[currtextdraw]=green100;
  1307.                     case yellow: boxcolor[currtextdraw]=yellow100;
  1308.                     case pink: boxcolor[currtextdraw]=pink100;
  1309.                     case light_blue: boxcolor[currtextdraw]=light_blue100;
  1310.                     case white: boxcolor[currtextdraw]=white100;
  1311.                     case black: boxcolor[currtextdraw]=black100;
  1312.                     }
  1313.                 }
  1314.             case 1:
  1315.                 {
  1316.                 switch(color)
  1317.                     {
  1318.                     case red: boxcolor[currtextdraw]=red80;
  1319.                     case blue: boxcolor[currtextdraw]=blue80;
  1320.                     case green: boxcolor[currtextdraw]=green80;
  1321.                     case yellow: boxcolor[currtextdraw]=yellow80;
  1322.                     case pink: boxcolor[currtextdraw]=pink80;
  1323.                     case light_blue: boxcolor[currtextdraw]=light_blue80;
  1324.                     case white: boxcolor[currtextdraw]=white80;
  1325.                     case black: boxcolor[currtextdraw]=black80;
  1326.                     }
  1327.                 }
  1328.             case 2:
  1329.                 {
  1330.                 switch(color)
  1331.                     {
  1332.                     case red: boxcolor[currtextdraw]=red60;
  1333.                     case blue: boxcolor[currtextdraw]=blue60;
  1334.                     case green: boxcolor[currtextdraw]=green60;
  1335.                     case yellow: boxcolor[currtextdraw]=yellow60;
  1336.                     case pink: boxcolor[currtextdraw]=pink60;
  1337.                     case light_blue: boxcolor[currtextdraw]=light_blue60;
  1338.                     case white: boxcolor[currtextdraw]=white60;
  1339.                     case black: boxcolor[currtextdraw]=black60;
  1340.                     }
  1341.                 }
  1342.             case 3:
  1343.                 {
  1344.                 switch(color)
  1345.                     {
  1346.                     case red: boxcolor[currtextdraw]=red40;
  1347.                     case blue: boxcolor[currtextdraw]=blue40;
  1348.                     case green: boxcolor[currtextdraw]=green40;
  1349.                     case yellow: boxcolor[currtextdraw]=yellow40;
  1350.                     case pink: boxcolor[currtextdraw]=pink40;
  1351.                     case light_blue: boxcolor[currtextdraw]=light_blue40;
  1352.                     case white: boxcolor[currtextdraw]=white40;
  1353.                     case black: boxcolor[currtextdraw]=black40;
  1354.                     }
  1355.                 }
  1356.             case 4:
  1357.                 {
  1358.                 switch(color)
  1359.                     {
  1360.                     case red: boxcolor[currtextdraw]=red20;
  1361.                     case blue: boxcolor[currtextdraw]=blue20;
  1362.                     case green: boxcolor[currtextdraw]=green20;
  1363.                     case yellow: boxcolor[currtextdraw]=yellow20;
  1364.                     case pink: boxcolor[currtextdraw]=pink20;
  1365.                     case light_blue: boxcolor[currtextdraw]=light_blue20;
  1366.                     case white: boxcolor[currtextdraw]=white20;
  1367.                     case black: boxcolor[currtextdraw]=black20;
  1368.                     }
  1369.                 }
  1370.             case 5:
  1371.                 {
  1372.                 switch(color)
  1373.                     {
  1374.                     case red: boxcolor[currtextdraw]=red0;
  1375.                     case blue: boxcolor[currtextdraw]=blue0;
  1376.                     case green: boxcolor[currtextdraw]=green0;
  1377.                     case yellow: boxcolor[currtextdraw]=yellow0;
  1378.                     case pink: boxcolor[currtextdraw]=pink0;
  1379.                     case light_blue: boxcolor[currtextdraw]=light_blue0;
  1380.                     case white: boxcolor[currtextdraw]=white0;
  1381.                     case black: boxcolor[currtextdraw]=black0;
  1382.                     }
  1383.                 }
  1384.             }
  1385.         UpdateTextDraw(currtextdraw,0);
  1386.         TogglePlayerControllable(playerid,1);
  1387.         menu=0;
  1388.         SendClientMessage(playerid,0x554466AA,"Color applied, box customization successful!");
  1389.         }
  1390.     else if(menu==7)
  1391.         {
  1392.         switch(row)
  1393.             {
  1394.             case 0:
  1395.                 {
  1396.                 color=red;
  1397.                 ShowMenuForPlayer(TransparencyM, playerid);
  1398.                 menu=8;
  1399.                 }
  1400.             case 1:
  1401.                 {
  1402.                 color=blue;
  1403.                 ShowMenuForPlayer(TransparencyM, playerid);
  1404.                 menu=8;
  1405.                 }
  1406.             case 2:
  1407.                 {
  1408.                 color=green;
  1409.                 ShowMenuForPlayer(TransparencyM, playerid);
  1410.                 menu=8;
  1411.                 }
  1412.             case 3:
  1413.                 {
  1414.                 color=yellow;
  1415.                 ShowMenuForPlayer(TransparencyM, playerid);
  1416.                 menu=8;
  1417.                 }
  1418.             case 4:
  1419.                 {
  1420.                 color=pink;
  1421.                 ShowMenuForPlayer(TransparencyM, playerid);
  1422.                 menu=8;
  1423.                 }
  1424.             case 5:
  1425.                 {
  1426.                 color=light_blue;
  1427.                 ShowMenuForPlayer(TransparencyM, playerid);
  1428.                 menu=8;
  1429.                 }
  1430.             case 6:
  1431.                 {
  1432.                 color=white;
  1433.                 ShowMenuForPlayer(TransparencyM, playerid);
  1434.                 menu=8;
  1435.                 }
  1436.             case 7:
  1437.                 {
  1438.                 color=black;
  1439.                 ShowMenuForPlayer(TransparencyM, playerid);
  1440.                 menu=8;
  1441.                 }
  1442.             }
  1443.         }
  1444.     else if(menu==8)
  1445.         {
  1446.         switch(row)
  1447.             {
  1448.             case 0:
  1449.                 {
  1450.                 switch(color)
  1451.                     {
  1452.                     case red: backcolor[currtextdraw]=red100;
  1453.                     case blue: backcolor[currtextdraw]=blue100;
  1454.                     case green: backcolor[currtextdraw]=green100;
  1455.                     case yellow: backcolor[currtextdraw]=yellow100;
  1456.                     case pink: backcolor[currtextdraw]=pink100;
  1457.                     case light_blue: backcolor[currtextdraw]=light_blue100;
  1458.                     case white: backcolor[currtextdraw]=white100;
  1459.                     case black: backcolor[currtextdraw]=black100;
  1460.                     }
  1461.                 }
  1462.             case 1:
  1463.                 {
  1464.                 switch(color)
  1465.                     {
  1466.                     case red: backcolor[currtextdraw]=red80;
  1467.                     case blue: backcolor[currtextdraw]=blue80;
  1468.                     case green: backcolor[currtextdraw]=green80;
  1469.                     case yellow: backcolor[currtextdraw]=yellow80;
  1470.                     case pink: backcolor[currtextdraw]=pink80;
  1471.                     case light_blue: backcolor[currtextdraw]=light_blue80;
  1472.                     case white: backcolor[currtextdraw]=white80;
  1473.                     case black: backcolor[currtextdraw]=black80;
  1474.                     }
  1475.                 }
  1476.             case 2:
  1477.                 {
  1478.                 switch(color)
  1479.                     {
  1480.                     case red: backcolor[currtextdraw]=red60;
  1481.                     case blue: backcolor[currtextdraw]=blue60;
  1482.                     case green: backcolor[currtextdraw]=green60;
  1483.                     case yellow: backcolor[currtextdraw]=yellow60;
  1484.                     case pink: backcolor[currtextdraw]=pink60;
  1485.                     case light_blue: backcolor[currtextdraw]=light_blue60;
  1486.                     case white: backcolor[currtextdraw]=white60;
  1487.                     case black: backcolor[currtextdraw]=black60;
  1488.                     }
  1489.                 }
  1490.             case 3:
  1491.                 {
  1492.                 switch(color)
  1493.                     {
  1494.                     case red: backcolor[currtextdraw]=red40;
  1495.                     case blue: backcolor[currtextdraw]=blue40;
  1496.                     case green: backcolor[currtextdraw]=green40;
  1497.                     case yellow: backcolor[currtextdraw]=yellow40;
  1498.                     case pink: backcolor[currtextdraw]=pink40;
  1499.                     case light_blue: backcolor[currtextdraw]=light_blue40;
  1500.                     case white: backcolor[currtextdraw]=white40;
  1501.                     case black: backcolor[currtextdraw]=black40;
  1502.                     }
  1503.                 }
  1504.             case 4:
  1505.                 {
  1506.                 switch(color)
  1507.                     {
  1508.                     case red: backcolor[currtextdraw]=red20;
  1509.                     case blue: backcolor[currtextdraw]=blue20;
  1510.                     case green: backcolor[currtextdraw]=green20;
  1511.                     case yellow: backcolor[currtextdraw]=yellow20;
  1512.                     case pink: backcolor[currtextdraw]=pink20;
  1513.                     case light_blue: backcolor[currtextdraw]=light_blue20;
  1514.                     case white: backcolor[currtextdraw]=white20;
  1515.                     case black: backcolor[currtextdraw]=black20;
  1516.                     }
  1517.                 }
  1518.             case 5:
  1519.                 {
  1520.                 switch(color)
  1521.                     {
  1522.                     case red: backcolor[currtextdraw]=red0;
  1523.                     case blue: backcolor[currtextdraw]=blue0;
  1524.                     case green: backcolor[currtextdraw]=green0;
  1525.                     case yellow: backcolor[currtextdraw]=yellow0;
  1526.                     case pink: backcolor[currtextdraw]=pink0;
  1527.                     case light_blue: backcolor[currtextdraw]=light_blue0;
  1528.                     case white: backcolor[currtextdraw]=white0;
  1529.                     case black: backcolor[currtextdraw]=black0;
  1530.                     }
  1531.                 }
  1532.             }
  1533.         UpdateTextDraw(currtextdraw,0);
  1534.         TogglePlayerControllable(playerid,1);
  1535.         menu=0;
  1536.         SendClientMessage(playerid,0x554466AA,"Color applied, box customization successful!");
  1537.         }
  1538.     else if(menu==9)
  1539.         {
  1540.         switch(row)
  1541.             {
  1542.             case 0: shadow[currtextdraw]=0;
  1543.             case 1: shadow[currtextdraw]=1;
  1544.             case 2: shadow[currtextdraw]=2;
  1545.             case 3: shadow[currtextdraw]=3;
  1546.             case 4: shadow[currtextdraw]=4;
  1547.             case 5: shadow[currtextdraw]=5;
  1548.             case 6: shadow[currtextdraw]=6;
  1549.             case 7: shadow[currtextdraw]=7;
  1550.             case 8: shadow[currtextdraw]=8;
  1551.             case 9: shadow[currtextdraw]=9;
  1552.             case 10: shadow[currtextdraw]=10;
  1553.             }
  1554.         UpdateTextDraw(currtextdraw,0);
  1555.         TogglePlayerControllable(playerid,1);
  1556.         menu=0;
  1557.         SendClientMessage(playerid,0x554466AA,"Shadow applied");
  1558.         }
  1559.     else if(menu==10)
  1560.         {
  1561.         switch(row)
  1562.             {
  1563.             case 0: proportional[currtextdraw]=0;
  1564.             case 1: proportional[currtextdraw]=1;
  1565.             }
  1566.         UpdateTextDraw(currtextdraw,0);
  1567.         TogglePlayerControllable(playerid,1);
  1568.         menu=0;
  1569.         SendClientMessage(playerid,0x554466AA,"Done");
  1570.         }
  1571.     else if(menu==11)
  1572.         {
  1573.         switch(row)
  1574.             {
  1575.             case 0: font[currtextdraw]=0;
  1576.             case 1: font[currtextdraw]=1;
  1577.             case 2: font[currtextdraw]=2;
  1578.             case 3: font[currtextdraw]=3;
  1579.             }
  1580.         UpdateTextDraw(currtextdraw,0);
  1581.         TogglePlayerControllable(playerid,1);
  1582.         menu=0;
  1583.         SendClientMessage(playerid,0x554466AA,"Font successfully changed");
  1584.         }
  1585.     else if(menu==12)
  1586.         {
  1587.         switch(row)
  1588.             {
  1589.             case 0: outline[currtextdraw]=0;
  1590.             case 1: outline[currtextdraw]=1;
  1591.             }
  1592.         UpdateTextDraw(currtextdraw,0);
  1593.         TogglePlayerControllable(playerid,1);
  1594.         menu=0;
  1595.         SendClientMessage(playerid,0x554466AA,"Changes applied");
  1596.         }
  1597.     return 1;
  1598. }
  1599.  
  1600. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  1601. {
  1602.     SetTimerEx("HoldKey", 300, 0, "d", playerid);
  1603.     if(movingtext && newkeys == KEY_WALK && textx[currtextdraw] <= 640.0)
  1604.         {
  1605.         textx[currtextdraw]+=1.0;
  1606.         UpdateTextDraw(currtextdraw,1);
  1607.         }
  1608.     if(movingtext && newkeys == KEY_LOOK_BEHIND && textx[currtextdraw] >= 0.0)
  1609.  
  1610.         {
  1611.         textx[currtextdraw]-=1.0;
  1612.         UpdateTextDraw(currtextdraw,1);
  1613.         }
  1614.     if(movingtext && newkeys == KEY_JUMP && texty[currtextdraw] >= 0.0)
  1615.         {
  1616.         texty[currtextdraw]-=1.0;
  1617.         UpdateTextDraw(currtextdraw,1);
  1618.         }
  1619.     if(movingtext && newkeys == KEY_CROUCH && texty[currtextdraw] <= 480.0)
  1620.         {
  1621.         texty[currtextdraw]+=1.0;
  1622.         UpdateTextDraw(currtextdraw,1);
  1623.         }
  1624.     if(movingtext && newkeys == KEY_WALK+KEY_SPRINT && textx[currtextdraw] <= 640.0)
  1625.         {
  1626.         textx[currtextdraw]+=10.0;
  1627.         UpdateTextDraw(currtextdraw,1);
  1628.         }
  1629.     if(movingtext && newkeys == KEY_LOOK_BEHIND+KEY_SPRINT && textx[currtextdraw] >= 0.0)
  1630.         {
  1631.         textx[currtextdraw]-=10.0;
  1632.         UpdateTextDraw(currtextdraw,1);
  1633.         }
  1634.     if(movingtext && newkeys == KEY_JUMP+KEY_SPRINT && texty[currtextdraw] >= 0.0)
  1635.         {
  1636.         texty[currtextdraw]-=10.0;
  1637.         UpdateTextDraw(currtextdraw,1);
  1638.         }
  1639.     if(movingtext && newkeys == KEY_CROUCH+KEY_SPRINT && texty[currtextdraw] <= 480.0)
  1640.         {
  1641.         texty[currtextdraw]+=10.0;
  1642.         UpdateTextDraw(currtextdraw,1);
  1643.         }
  1644.     if(movingtext && newkeys == KEY_ACTION)
  1645.         {
  1646.         SendClientMessage(playerid,0x554466AA,"Text sucessfully placed!");
  1647.         TogglePlayerControllable(playerid,1);
  1648.         movingtext=0;
  1649.         }
  1650.     if(lettersizing && newkeys == KEY_WALK && textx[currtextdraw] <= 640.0)
  1651.         {
  1652.         lettersizex[currtextdraw]+=0.1;
  1653.         UpdateTextDraw(currtextdraw,0);
  1654.         }
  1655.     if(lettersizing && newkeys == KEY_LOOK_BEHIND && textx[currtextdraw] >= 0.0)
  1656.         {
  1657.         lettersizex[currtextdraw]-=0.1;
  1658.         UpdateTextDraw(currtextdraw,0);
  1659.         }
  1660.     if(lettersizing && newkeys == KEY_JUMP && texty[currtextdraw] >= 0.0)
  1661.         {
  1662.         lettersizey[currtextdraw]-=0.1;
  1663.         UpdateTextDraw(currtextdraw,0);
  1664.         }
  1665.     if(lettersizing && newkeys == KEY_CROUCH && texty[currtextdraw] <= 480.0)
  1666.         {
  1667.         lettersizey[currtextdraw]+=0.1;
  1668.         UpdateTextDraw(currtextdraw,0);
  1669.         }
  1670.     if(lettersizing && newkeys == KEY_WALK+KEY_SPRINT && textx[currtextdraw] <= 640.0)
  1671.         {
  1672.         lettersizex[currtextdraw]+=1.0;
  1673.         UpdateTextDraw(currtextdraw,0);
  1674.         }
  1675.     if(lettersizing && newkeys == KEY_LOOK_BEHIND+KEY_SPRINT && textx[currtextdraw] >= 0.0)
  1676.         {
  1677.         lettersizex[currtextdraw]-=1.0;
  1678.         UpdateTextDraw(currtextdraw,0);
  1679.         }
  1680.     if(lettersizing && newkeys == KEY_JUMP+KEY_SPRINT && texty[currtextdraw] >= 0.0)
  1681.         {
  1682.         lettersizey[currtextdraw]-=1.0;
  1683.         UpdateTextDraw(currtextdraw,0);
  1684.         }
  1685.     if(lettersizing && newkeys == KEY_CROUCH+KEY_SPRINT && texty[currtextdraw] <= 480.0)
  1686.         {
  1687.         lettersizey[currtextdraw]+=1.0;
  1688.         UpdateTextDraw(currtextdraw,0);
  1689.         }
  1690.     if(lettersizing && newkeys == KEY_ACTION)
  1691.         {
  1692.         SendClientMessage(playerid,0x554466AA,"Text sucessfully placed!");
  1693.         TogglePlayerControllable(playerid,1);
  1694.         lettersizing=0;
  1695.         }
  1696.     if(boxsizing && newkeys == KEY_WALK && textx[currtextdraw] <= 640.0)
  1697.         {
  1698.         boxsizex[currtextdraw]+=1.0;
  1699.         UpdateTextDraw(currtextdraw,0);
  1700.         }
  1701.     if(boxsizing && newkeys == KEY_LOOK_BEHIND && textx[currtextdraw] >= 0.0)
  1702.         {
  1703.         boxsizex[currtextdraw]-=1.0;
  1704.         UpdateTextDraw(currtextdraw,0);
  1705.         }
  1706.     if(boxsizing && newkeys == KEY_JUMP && texty[currtextdraw] >= 0.0)
  1707.         {
  1708.         boxsizey[currtextdraw]-=1.0;
  1709.         UpdateTextDraw(currtextdraw,0);
  1710.         }
  1711.     if(boxsizing && newkeys == KEY_CROUCH && texty[currtextdraw] <= 480.0)
  1712.         {
  1713.         boxsizey[currtextdraw]+=1.0;
  1714.         UpdateTextDraw(currtextdraw,0);
  1715.         }
  1716.     if(boxsizing && newkeys == KEY_WALK+KEY_SPRINT && textx[currtextdraw] <= 640.0)
  1717.         {
  1718.         boxsizex[currtextdraw]+=10.0;
  1719.         UpdateTextDraw(currtextdraw,0);
  1720.         }
  1721.     if(boxsizing && newkeys == KEY_LOOK_BEHIND+KEY_SPRINT && textx[currtextdraw] >= 0.0)
  1722.         {
  1723.         boxsizex[currtextdraw]-=10.0;
  1724.         UpdateTextDraw(currtextdraw,0);
  1725.         }
  1726.     if(boxsizing && newkeys == KEY_JUMP+KEY_SPRINT && texty[currtextdraw] >= 0.0)
  1727.         {
  1728.         boxsizey[currtextdraw]-=10.0;
  1729.         UpdateTextDraw(currtextdraw,0);
  1730.         }
  1731.     if(boxsizing && newkeys == KEY_CROUCH+KEY_SPRINT && texty[currtextdraw] <= 480.0)
  1732.         {
  1733.         boxsizey[currtextdraw]+=10.0;
  1734.         UpdateTextDraw(currtextdraw,0);
  1735.         }
  1736.     if(boxsizing && newkeys == KEY_ACTION)
  1737.         {
  1738.         SendClientMessage(playerid,0x554466AA,"Box size successfully changed, changing color");
  1739.         boxsizing=0;
  1740.         menu=5;
  1741.         ShowMenuForPlayer(ColorM,playerid);
  1742.         }
  1743.     return 1;
  1744. }
  1745.  
  1746. public OnPlayerExitedMenu(playerid)
  1747. {
  1748.     TogglePlayerControllable(playerid, 1);
  1749.     SendClientMessage(playerid,0x554466AA,"Selection has been canceled");
  1750.     menu=0;
  1751.     return 1;
  1752.  
  1753. }
  1754.  
  1755. UpdateTextDraw(curr,destroy)
  1756. {
  1757.     TextDrawHideForAll(Textdraw[curr]);
  1758.     if(destroy)
  1759.         {
  1760.         TextDrawDestroy(Textdraw[curr]);
  1761.         Textdraw[curr] = TextDrawCreate(textx[curr],texty[curr],textdrawtext[curr]);
  1762.         }
  1763.     TextDrawUseBox(Textdraw[curr],box[curr]);
  1764.     if(box[curr])
  1765.         {
  1766.         TextDrawBoxColor(Textdraw[curr], boxcolor[curr]);
  1767.         TextDrawTextSize(Textdraw[curr], boxsizex[curr], boxsizey[curr]);
  1768.         }
  1769.     TextDrawSetString(Textdraw[curr],textdrawtext[curr]);
  1770.     TextDrawAlignment(Textdraw[curr],alignment[curr]);
  1771.     TextDrawBackgroundColor(Textdraw[curr],backcolor[curr]);
  1772.     TextDrawColor(Textdraw[curr], textcolor[curr]);
  1773.     TextDrawFont(Textdraw[curr],font[curr]);
  1774.     TextDrawLetterSize(Textdraw[curr],lettersizex[curr],lettersizey[curr]);
  1775.     TextDrawSetOutline(Textdraw[curr],outline[curr]);
  1776.     TextDrawSetProportional(Textdraw[curr],proportional[curr]);
  1777.     TextDrawSetShadow(Textdraw[curr],shadow[curr]);
  1778.     TextDrawShowForAll(Textdraw[curr]);
  1779. }
  1780.  
  1781. sscanf(string[], format[], {Float,_}:...)
  1782. {
  1783.     new
  1784.         formatPos,
  1785.         stringPos,
  1786.         paramPos = 2,
  1787.         paramCount = numargs();
  1788.     while (paramPos < paramCount && string[stringPos])
  1789.     {
  1790.         switch (format[formatPos])
  1791.         {
  1792.             case '\0': break;
  1793.             case 'i', 'd': setarg(paramPos, 0, strval(string[stringPos]));
  1794.             case 'c': setarg(paramPos, 0, string[stringPos]);
  1795.             case 'f': setarg(paramPos, 0, _:floatstr(string[stringPos]));
  1796.             case 's':
  1797.             {
  1798.                 new
  1799.                     end = format[formatPos + 1] == '\0' ? '\0' : ' ',
  1800.                     i;
  1801.                 while (string[stringPos] != end) setarg(paramPos, i++, string[stringPos++]);
  1802.                 setarg(paramPos, i, '\0');
  1803.             }
  1804.             default: goto skip;
  1805.         }
  1806.         while (string[stringPos] && string[stringPos] != ' ') stringPos++;
  1807.         while (string[stringPos] == ' ') stringPos++;
  1808.         paramPos++;
  1809.         skip:
  1810.         formatPos++;
  1811.     }
  1812.     return format[formatPos] ? 0 : 1;
  1813. }
  1814.  
  1815. public HoldKey(playerid)
  1816. {
  1817.     new keys,
  1818.         updown,
  1819.         leftright
  1820.     ;
  1821.     GetPlayerKeys(playerid, keys, updown, leftright);
  1822.     if(movingtext && keys == KEY_WALK && textx[currtextdraw] <= 640.0)
  1823.     {
  1824.         textx[currtextdraw]+=1.0;
  1825.         UpdateTextDraw(currtextdraw,1);
  1826.     }
  1827.     if(movingtext && keys == KEY_LOOK_BEHIND && textx[currtextdraw] >= 0.0)
  1828.     {
  1829.         textx[currtextdraw]-=1.0;
  1830.         UpdateTextDraw(currtextdraw,1);
  1831.     }
  1832.     if(movingtext && keys == KEY_JUMP && texty[currtextdraw] >= 0.0)
  1833.     {
  1834.         texty[currtextdraw]-=1.0;
  1835.         UpdateTextDraw(currtextdraw,1);
  1836.     }
  1837.     if(movingtext && keys == KEY_CROUCH && texty[currtextdraw] <= 480.0)
  1838.     {
  1839.         texty[currtextdraw]+=1.0;
  1840.         UpdateTextDraw(currtextdraw,1);
  1841.     }
  1842.     if(movingtext && keys == KEY_WALK+KEY_SPRINT && textx[currtextdraw] <= 640.0)
  1843.     {
  1844.         textx[currtextdraw]+=10.0;
  1845.         UpdateTextDraw(currtextdraw,1);
  1846.     }
  1847.     if(movingtext && keys == KEY_LOOK_BEHIND+KEY_SPRINT && textx[currtextdraw] >= 0.0)
  1848.     {
  1849.         textx[currtextdraw]-=10.0;
  1850.         UpdateTextDraw(currtextdraw,1);
  1851.     }
  1852.     if(movingtext && keys == KEY_JUMP+KEY_SPRINT && texty[currtextdraw] >= 0.0)
  1853.     {
  1854.         texty[currtextdraw]-=10.0;
  1855.         UpdateTextDraw(currtextdraw,1);
  1856.     }
  1857.     if(movingtext && keys == KEY_CROUCH+KEY_SPRINT && texty[currtextdraw] <= 480.0)
  1858.     {
  1859.         texty[currtextdraw]+=10.0;
  1860.         UpdateTextDraw(currtextdraw,1);
  1861.     }
  1862.     if(movingtext && keys == KEY_ACTION)
  1863.     {
  1864.         SendClientMessage(playerid,0x554466AA,"Text sucessfully placed!");
  1865.         TogglePlayerControllable(playerid,1);
  1866.         movingtext=0;
  1867.     }
  1868.     if(lettersizing && keys == KEY_WALK && textx[currtextdraw] <= 640.0)
  1869.     {
  1870.         lettersizex[currtextdraw]+=0.1;
  1871.         UpdateTextDraw(currtextdraw,0);
  1872.     }
  1873.     if(lettersizing && keys == KEY_LOOK_BEHIND && textx[currtextdraw] >= 0.0)
  1874.     {
  1875.         lettersizex[currtextdraw]-=0.1;
  1876.         UpdateTextDraw(currtextdraw,0);
  1877.     }
  1878.     if(lettersizing && keys == KEY_JUMP && texty[currtextdraw] >= 0.0)
  1879.     {
  1880.         lettersizey[currtextdraw]-=0.1;
  1881.         UpdateTextDraw(currtextdraw,0);
  1882.     }
  1883.     if(lettersizing && keys == KEY_CROUCH && texty[currtextdraw] <= 480.0)
  1884.     {
  1885.         lettersizey[currtextdraw]+=0.1;
  1886.         UpdateTextDraw(currtextdraw,0);
  1887.     }
  1888.     if(lettersizing && keys == KEY_WALK+KEY_SPRINT && textx[currtextdraw] <= 640.0)
  1889.     {
  1890.         lettersizex[currtextdraw]+=1.0;
  1891.         UpdateTextDraw(currtextdraw,0);
  1892.     }
  1893.     if(lettersizing && keys == KEY_LOOK_BEHIND+KEY_SPRINT && textx[currtextdraw] >= 0.0)
  1894.     {
  1895.         lettersizex[currtextdraw]-=1.0;
  1896.         UpdateTextDraw(currtextdraw,0);
  1897.     }
  1898.     if(lettersizing && keys == KEY_JUMP+KEY_SPRINT && texty[currtextdraw] >= 0.0)
  1899.     {
  1900.         lettersizey[currtextdraw]-=1.0;
  1901.         UpdateTextDraw(currtextdraw,0);
  1902.     }
  1903.     if(lettersizing && keys == KEY_CROUCH+KEY_SPRINT && texty[currtextdraw] <= 480.0)
  1904.     {
  1905.         lettersizey[currtextdraw]+=1.0;
  1906.         UpdateTextDraw(currtextdraw,0);
  1907.     }
  1908.     if(lettersizing && keys == KEY_ACTION)
  1909.     {
  1910.         SendClientMessage(playerid,0x554466AA,"Text sucessfully placed!");
  1911.         TogglePlayerControllable(playerid,1);
  1912.         lettersizing=0;
  1913.     }
  1914.     if(boxsizing && keys == KEY_WALK && textx[currtextdraw] <= 640.0)
  1915.     {
  1916.         boxsizex[currtextdraw]+=1.0;
  1917.         UpdateTextDraw(currtextdraw,0);
  1918.     }
  1919.     if(boxsizing && keys == KEY_LOOK_BEHIND && textx[currtextdraw] >= 0.0)
  1920.     {
  1921.         boxsizex[currtextdraw]-=1.0;
  1922.         UpdateTextDraw(currtextdraw,0);
  1923.     }
  1924.     if(boxsizing && keys == KEY_JUMP && texty[currtextdraw] >= 0.0)
  1925.     {
  1926.         boxsizey[currtextdraw]-=1.0;
  1927.         UpdateTextDraw(currtextdraw,0);
  1928.     }
  1929.     if(boxsizing && keys == KEY_CROUCH && texty[currtextdraw] <= 480.0)
  1930.     {
  1931.         boxsizey[currtextdraw]+=1.0;
  1932.         UpdateTextDraw(currtextdraw,0);
  1933.     }
  1934.     if(boxsizing && keys == KEY_WALK+KEY_SPRINT && textx[currtextdraw] <= 640.0)
  1935.     {
  1936.         boxsizex[currtextdraw]+=10.0;
  1937.         UpdateTextDraw(currtextdraw,0);
  1938.     }
  1939.     if(boxsizing && keys == KEY_LOOK_BEHIND+KEY_SPRINT && textx[currtextdraw] >= 0.0)
  1940.     {
  1941.         boxsizex[currtextdraw]-=10.0;
  1942.         UpdateTextDraw(currtextdraw,0);
  1943.     }
  1944.     if(boxsizing && keys == KEY_JUMP+KEY_SPRINT && texty[currtextdraw] >= 0.0)
  1945.     {
  1946.         boxsizey[currtextdraw]-=10.0;
  1947.         UpdateTextDraw(currtextdraw,0);
  1948.     }
  1949.     if(boxsizing && keys == KEY_CROUCH+KEY_SPRINT && texty[currtextdraw] <= 480.0)
  1950.     {
  1951.         boxsizey[currtextdraw]+=10.0;
  1952.         UpdateTextDraw(currtextdraw,0);
  1953.     }
  1954.     if(boxsizing && keys == KEY_ACTION)
  1955.     {
  1956.         SendClientMessage(playerid,0x554466AA,"Box size successfully changed, changing color");
  1957.         boxsizing=0;
  1958.         menu=5;
  1959.         ShowMenuForPlayer(ColorM,playerid);
  1960.     }
  1961.     if (keys > 0) SetTimerEx("HoldKey", 300, 0, "d", playerid);
  1962. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement