(FS) Мобильная игра: 2048

Готовые решения скриптов, filterScript

Модератор: SJplayer

Аватара
Автор темы
Miranda F
Старшина
Старшина
Сообщения: 130
Репутация: 11
С нами: 5 лет 1 месяц

(FS) Мобильная игра: 2048

Сообщение #1 Miranda » 3 июня 2014, 16:57

Изображение


Автор:Matz

Привет всем. Сегодня я играл в игру под названием 2048 в моем сотовом телефоне и решил сделать это:

2048 является однопользовательская онлайн-игра создана в марте 2014 г. 19-летний итальянский веб-разработчика Габриэле Cirulli, в которой целью является, чтобы скользить пронумерованных плиток на сетке, чтобы объединить их и создать плитку с номером 2048. Оно может рассматривать как один из видов скольжения блока головоломки.

Изображение


Код

Код: Выделить всё

/* 2048 SA-MP Version by Matz
http://forum.sa-mp.com/member.php?u=125232 */

#include <a_samp>

new Text:Textdraw2048Background1;
new Text:Textdraw2048Background2;
new Text:Textdraw2048Background3;
new Text:Textdraw2048Background4;
new Text:Textdraw2048Background5;
new Text:Textdraw2048Background6;
new Text:Textdraw2048Spot0[MAX_PLAYERS];
new Text:Textdraw2048Spot1[MAX_PLAYERS];
new Text:Textdraw2048Spot2[MAX_PLAYERS];
new Text:Textdraw2048Spot3[MAX_PLAYERS];
new Text:Textdraw2048Spot4[MAX_PLAYERS];
new Text:Textdraw2048Spot5[MAX_PLAYERS];
new Text:Textdraw2048Spot6[MAX_PLAYERS];
new Text:Textdraw2048Spot7[MAX_PLAYERS];
new Text:Textdraw2048Spot8[MAX_PLAYERS];
new Text:Textdraw2048Spot9[MAX_PLAYERS];
new Text:Textdraw2048Spot10[MAX_PLAYERS];
new Text:Textdraw2048Spot11[MAX_PLAYERS];
new Text:Textdraw2048Spot12[MAX_PLAYERS];
new Text:Textdraw2048Spot13[MAX_PLAYERS];
new Text:Textdraw2048Spot14[MAX_PLAYERS];
new Text:Textdraw2048Spot15[MAX_PLAYERS];
new Text:Textdraw2048Up;
new Text:Textdraw2048Down;
new Text:Textdraw2048Left;
new Text:Textdraw2048Right;
new Text:Textdraw2048Score;
new Text:Textdraw2048PlayerScore[MAX_PLAYERS];
new Text:Textdraw2048Best;
new Text:Textdraw2048PlayerBest[MAX_PLAYERS];
new Text:TextdrawSpotNumber0[MAX_PLAYERS];
new Text:TextdrawSpotNumber1[MAX_PLAYERS];
new Text:TextdrawSpotNumber2[MAX_PLAYERS];
new Text:TextdrawSpotNumber3[MAX_PLAYERS];
new Text:TextdrawSpotNumber4[MAX_PLAYERS];
new Text:TextdrawSpotNumber5[MAX_PLAYERS];
new Text:TextdrawSpotNumber6[MAX_PLAYERS];
new Text:TextdrawSpotNumber7[MAX_PLAYERS];
new Text:TextdrawSpotNumber8[MAX_PLAYERS];
new Text:TextdrawSpotNumber9[MAX_PLAYERS];
new Text:TextdrawSpotNumber10[MAX_PLAYERS];
new Text:TextdrawSpotNumber11[MAX_PLAYERS];
new Text:TextdrawSpotNumber12[MAX_PLAYERS];
new Text:TextdrawSpotNumber13[MAX_PLAYERS];
new Text:TextdrawSpotNumber14[MAX_PLAYERS];
new Text:TextdrawSpotNumber15[MAX_PLAYERS];

new Spot[MAX_PLAYERS][16];
new PlayerScore[MAX_PLAYERS];

public OnFilterScriptInit()
{
   for(new i = 0; i < MAX_PLAYERS; i++)
    {
       if(IsPlayerConnected(i))
       {
           for(new s = 0; s < 16; s++)
          {
              Spot[i][s] = 0;
           }
        }
    }

    Textdraw2048Background1 = TextDrawCreate(413.000000, 154.000000, "_");
   TextDrawBackgroundColor(Textdraw2048Background1, 255);
   TextDrawFont(Textdraw2048Background1, 1);
   TextDrawLetterSize(Textdraw2048Background1, 0.500000, 21.699995);
   TextDrawColor(Textdraw2048Background1, -1);
   TextDrawSetOutline(Textdraw2048Background1, 0);
   TextDrawSetProportional(Textdraw2048Background1, 1);
   TextDrawSetShadow(Textdraw2048Background1, 1);
   TextDrawUseBox(Textdraw2048Background1, 1);
   TextDrawBoxColor(Textdraw2048Background1, -13057);
   TextDrawTextSize(Textdraw2048Background1, 222.000000, 50.000000);
   TextDrawSetSelectable(Textdraw2048Background1, 0);

   Textdraw2048Background2 = TextDrawCreate(237.000000, 161.000000, "2048");
   TextDrawBackgroundColor(Textdraw2048Background2, 255);
   TextDrawFont(Textdraw2048Background2, 1);
   TextDrawLetterSize(Textdraw2048Background2, 0.869998, 3.299999);
   TextDrawColor(Textdraw2048Background2, 1195853823);
   TextDrawSetOutline(Textdraw2048Background2, 0);
   TextDrawSetProportional(Textdraw2048Background2, 1);
   TextDrawSetShadow(Textdraw2048Background2, 0);
   TextDrawSetSelectable(Textdraw2048Background2, 0);

   Textdraw2048Background3 = TextDrawCreate(232.000000, 203.000000, "Join the numbers and get to the 2048 tile!");
   TextDrawBackgroundColor(Textdraw2048Background3, 255);
   TextDrawFont(Textdraw2048Background3, 1);
   TextDrawLetterSize(Textdraw2048Background3, 0.189999, 0.800000);
   TextDrawColor(Textdraw2048Background3, 1195853823);
   TextDrawSetOutline(Textdraw2048Background3, 0);
   TextDrawSetProportional(Textdraw2048Background3, 1);
   TextDrawSetShadow(Textdraw2048Background3, 0);
   TextDrawSetSelectable(Textdraw2048Background3, 0);

   Textdraw2048Background4 = TextDrawCreate(406.000000, 167.000000, "_");
   TextDrawBackgroundColor(Textdraw2048Background4, 255);
   TextDrawFont(Textdraw2048Background4, 1);
   TextDrawLetterSize(Textdraw2048Background4, 0.500000, 2.099998);
   TextDrawColor(Textdraw2048Background4, -1);
   TextDrawSetOutline(Textdraw2048Background4, 0);
   TextDrawSetProportional(Textdraw2048Background4, 1);
   TextDrawSetShadow(Textdraw2048Background4, 1);
   TextDrawUseBox(Textdraw2048Background4, 1);
   TextDrawBoxColor(Textdraw2048Background4, 100);
   TextDrawTextSize(Textdraw2048Background4, 362.000000, 0.000000);
   TextDrawSetSelectable(Textdraw2048Background4, 0);

   Textdraw2048Background5 = TextDrawCreate(364.000000, 167.000000, "_");
   TextDrawBackgroundColor(Textdraw2048Background5, 255);
   TextDrawFont(Textdraw2048Background5, 1);
   TextDrawLetterSize(Textdraw2048Background5, 0.500000, 2.099998);
   TextDrawColor(Textdraw2048Background5, -1);
   TextDrawSetOutline(Textdraw2048Background5, 0);
   TextDrawSetProportional(Textdraw2048Background5, 1);
   TextDrawSetShadow(Textdraw2048Background5, 1);
   TextDrawUseBox(Textdraw2048Background5, 1);
   TextDrawBoxColor(Textdraw2048Background5, 100);
   TextDrawTextSize(Textdraw2048Background5, 320.000000, 0.000000);
   TextDrawSetSelectable(Textdraw2048Background5, 0);

   Textdraw2048Background6 = TextDrawCreate(406.000000, 222.000000, "_");
   TextDrawBackgroundColor(Textdraw2048Background6, 255);
   TextDrawFont(Textdraw2048Background6, 1);
   TextDrawLetterSize(Textdraw2048Background6, 0.509998, 13.299997);
   TextDrawColor(Textdraw2048Background6, -1);
   TextDrawSetOutline(Textdraw2048Background6, 0);
   TextDrawSetProportional(Textdraw2048Background6, 1);
   TextDrawSetShadow(Textdraw2048Background6, 1);
   TextDrawUseBox(Textdraw2048Background6, 1);
   TextDrawBoxColor(Textdraw2048Background6, 100);
   TextDrawTextSize(Textdraw2048Background6, 229.000000, 0.000000);
   TextDrawSetSelectable(Textdraw2048Background6, 0);

   Textdraw2048Up = TextDrawCreate(303.000000, 111.000000, "LD_BEAT:up");
   TextDrawBackgroundColor(Textdraw2048Up, 255);
   TextDrawFont(Textdraw2048Up, 4);
   TextDrawLetterSize(Textdraw2048Up, 0.500000, 1.000000);
   TextDrawColor(Textdraw2048Up, -1);
   TextDrawSetOutline(Textdraw2048Up, 0);
   TextDrawSetProportional(Textdraw2048Up, 1);
   TextDrawSetShadow(Textdraw2048Up, 1);
   TextDrawUseBox(Textdraw2048Up, 1);
   TextDrawBoxColor(Textdraw2048Up, 255);
   TextDrawTextSize(Textdraw2048Up, 30.000000, 40.000000);
   TextDrawSetSelectable(Textdraw2048Up, 1);

   Textdraw2048Down = TextDrawCreate(303.000000, 355.000000, "LD_BEAT:down");
   TextDrawBackgroundColor(Textdraw2048Down, 255);
   TextDrawFont(Textdraw2048Down, 4);
   TextDrawLetterSize(Textdraw2048Down, 0.500000, 1.000000);
   TextDrawColor(Textdraw2048Down, -1);
   TextDrawSetOutline(Textdraw2048Down, 0);
   TextDrawSetProportional(Textdraw2048Down, 1);
   TextDrawSetShadow(Textdraw2048Down, 1);
   TextDrawUseBox(Textdraw2048Down, 1);
   TextDrawBoxColor(Textdraw2048Down, 255);
   TextDrawTextSize(Textdraw2048Down, 30.000000, 40.000000);
   TextDrawSetSelectable(Textdraw2048Down, 1);

   Textdraw2048Left = TextDrawCreate(195.000000, 263.000000, "LD_BEAT:left");
   TextDrawBackgroundColor(Textdraw2048Left, 255);
   TextDrawFont(Textdraw2048Left, 4);
   TextDrawLetterSize(Textdraw2048Left, 0.500000, 1.000000);
   TextDrawColor(Textdraw2048Left, -1);
   TextDrawSetOutline(Textdraw2048Left, 0);
   TextDrawSetProportional(Textdraw2048Left, 1);
   TextDrawSetShadow(Textdraw2048Left, 1);
   TextDrawUseBox(Textdraw2048Left, 1);
   TextDrawBoxColor(Textdraw2048Left, 255);
   TextDrawTextSize(Textdraw2048Left, 30.000000, 40.000000);
   TextDrawSetSelectable(Textdraw2048Left, 1);

   Textdraw2048Right = TextDrawCreate(411.000000, 263.000000, "LD_BEAT:right");
   TextDrawBackgroundColor(Textdraw2048Right, 255);
   TextDrawFont(Textdraw2048Right, 4);
   TextDrawLetterSize(Textdraw2048Right, 0.500000, 1.000000);
   TextDrawColor(Textdraw2048Right, -1);
   TextDrawSetOutline(Textdraw2048Right, 0);
   TextDrawSetProportional(Textdraw2048Right, 1);
   TextDrawSetShadow(Textdraw2048Right, 1);
   TextDrawUseBox(Textdraw2048Right, 1);
   TextDrawBoxColor(Textdraw2048Right, 255);
   TextDrawTextSize(Textdraw2048Right, 30.000000, 40.000000);
   TextDrawSetSelectable(Textdraw2048Right, 1);

   Textdraw2048Score = TextDrawCreate(325.000000, 164.000000, "SCORE");
   TextDrawBackgroundColor(Textdraw2048Score, 255);
   TextDrawFont(Textdraw2048Score, 2);
   TextDrawLetterSize(Textdraw2048Score, 0.259999, 0.899999);
   TextDrawColor(Textdraw2048Score, -1);
   TextDrawSetOutline(Textdraw2048Score, 0);
   TextDrawSetProportional(Textdraw2048Score, 1);
   TextDrawSetShadow(Textdraw2048Score, 0);
   TextDrawSetSelectable(Textdraw2048Score, 0);
   
   Textdraw2048Best = TextDrawCreate(371.000000, 164.000000, "BEST");
   TextDrawBackgroundColor(Textdraw2048Best, 255);
   TextDrawFont(Textdraw2048Best, 2);
   TextDrawLetterSize(Textdraw2048Best, 0.259999, 0.899999);
   TextDrawColor(Textdraw2048Best, -1);
   TextDrawSetOutline(Textdraw2048Best, 0);
   TextDrawSetProportional(Textdraw2048Best, 1);
   TextDrawSetShadow(Textdraw2048Best, 0);
   TextDrawSetSelectable(Textdraw2048Best, 0);
    
    for(new p = 0; p < MAX_PLAYERS; p++)
    {
        if(IsPlayerConnected(p))
        {
            PlayerScore[p] = 0;
           
            Textdraw2048Spot3[p] = TextDrawCreate(403.000000, 226.000000, "_");
         TextDrawBackgroundColor(Textdraw2048Spot3[p], 255);
         TextDrawFont(Textdraw2048Spot3[p], 1);
         TextDrawLetterSize(Textdraw2048Spot3[p], 0.500000, 2.099998);
         TextDrawColor(Textdraw2048Spot3[p], -1);
         TextDrawSetOutline(Textdraw2048Spot3[p], 0);
         TextDrawSetProportional(Textdraw2048Spot3[p], 1);
         TextDrawSetShadow(Textdraw2048Spot3[p], 1);
         TextDrawUseBox(Textdraw2048Spot3[p], 1);
         TextDrawBoxColor(Textdraw2048Spot3[p], 100);
         TextDrawTextSize(Textdraw2048Spot3[p], 359.000000, 0.000000);
         TextDrawSetSelectable(Textdraw2048Spot3[p], 0);

         Textdraw2048Spot2[p] = TextDrawCreate(362.000000, 226.000000, "_");
         TextDrawBackgroundColor(Textdraw2048Spot2[p], 255);
         TextDrawFont(Textdraw2048Spot2[p], 1);
         TextDrawLetterSize(Textdraw2048Spot2[p], 0.500000, 2.099998);
         TextDrawColor(Textdraw2048Spot2[p], -1);
         TextDrawSetOutline(Textdraw2048Spot2[p], 0);
         TextDrawSetProportional(Textdraw2048Spot2[p], 1);
         TextDrawSetShadow(Textdraw2048Spot2[p], 1);
         TextDrawUseBox(Textdraw2048Spot2[p], 1);
         TextDrawBoxColor(Textdraw2048Spot2[p], 100);
         TextDrawTextSize(Textdraw2048Spot2[p], 316.000000, 0.000000);
         TextDrawSetSelectable(Textdraw2048Spot2[p], 0);

         Textdraw2048Spot1[p] = TextDrawCreate(319.000000, 226.000000, "_");
         TextDrawBackgroundColor(Textdraw2048Spot1[p], 255);
         TextDrawFont(Textdraw2048Spot1[p], 1);
         TextDrawLetterSize(Textdraw2048Spot1[p], 0.500000, 2.099998);
         TextDrawColor(Textdraw2048Spot1[p], -1);
         TextDrawSetOutline(Textdraw2048Spot1[p], 0);
         TextDrawSetProportional(Textdraw2048Spot1[p], 1);
         TextDrawSetShadow(Textdraw2048Spot1[p], 1);
         TextDrawUseBox(Textdraw2048Spot1[p], 1);
         TextDrawBoxColor(Textdraw2048Spot1[p], 100);
         TextDrawTextSize(Textdraw2048Spot1[p], 274.000000, 0.000000);
         TextDrawSetSelectable(Textdraw2048Spot1[p], 0);

         Textdraw2048Spot0[p] = TextDrawCreate(277.000000, 226.000000, "_");
         TextDrawBackgroundColor(Textdraw2048Spot0[p], 255);
         TextDrawFont(Textdraw2048Spot0[p], 1);
         TextDrawLetterSize(Textdraw2048Spot0[p], 0.500000, 2.099998);
         TextDrawColor(Textdraw2048Spot0[p], -1);
         TextDrawSetOutline(Textdraw2048Spot0[p], 0);
         TextDrawSetProportional(Textdraw2048Spot0[p], 1);
         TextDrawSetShadow(Textdraw2048Spot0[p], 1);
         TextDrawUseBox(Textdraw2048Spot0[p], 1);
         TextDrawBoxColor(Textdraw2048Spot0[p], 100);
         TextDrawTextSize(Textdraw2048Spot0[p], 232.000000, 0.000000);
         TextDrawSetSelectable(Textdraw2048Spot0[p], 0);

         Textdraw2048Spot7[p] = TextDrawCreate(403.000000, 257.000000, "_");
         TextDrawBackgroundColor(Textdraw2048Spot7[p], 255);
         TextDrawFont(Textdraw2048Spot7[p], 1);
         TextDrawLetterSize(Textdraw2048Spot7[p], 0.500000, 2.099998);
         TextDrawColor(Textdraw2048Spot7[p], -1);
         TextDrawSetOutline(Textdraw2048Spot7[p], 0);
         TextDrawSetProportional(Textdraw2048Spot7[p], 1);
         TextDrawSetShadow(Textdraw2048Spot7[p], 1);
         TextDrawUseBox(Textdraw2048Spot7[p], 1);
         TextDrawBoxColor(Textdraw2048Spot7[p], 100);
         TextDrawTextSize(Textdraw2048Spot7[p], 359.000000, 0.000000);
         TextDrawSetSelectable(Textdraw2048Spot7[p], 0);

         Textdraw2048Spot6[p] = TextDrawCreate(362.000000, 257.000000, "_");
         TextDrawBackgroundColor(Textdraw2048Spot6[p], 255);
         TextDrawFont(Textdraw2048Spot6[p], 1);
         TextDrawLetterSize(Textdraw2048Spot6[p], 0.500000, 2.099998);
         TextDrawColor(Textdraw2048Spot6[p], -1);
         TextDrawSetOutline(Textdraw2048Spot6[p], 0);
         TextDrawSetProportional(Textdraw2048Spot6[p], 1);
         TextDrawSetShadow(Textdraw2048Spot6[p], 1);
         TextDrawUseBox(Textdraw2048Spot6[p], 1);
         TextDrawBoxColor(Textdraw2048Spot6[p], 100);
         TextDrawTextSize(Textdraw2048Spot6[p], 316.000000, 0.000000);
         TextDrawSetSelectable(Textdraw2048Spot6[p], 0);

         Textdraw2048Spot5[p] = TextDrawCreate(319.000000, 257.000000, "_");
         TextDrawBackgroundColor(Textdraw2048Spot5[p], 255);
         TextDrawFont(Textdraw2048Spot5[p], 1);
         TextDrawLetterSize(Textdraw2048Spot5[p], 0.500000, 2.099998);
         TextDrawColor(Textdraw2048Spot5[p], -1);
         TextDrawSetOutline(Textdraw2048Spot5[p], 0);
         TextDrawSetProportional(Textdraw2048Spot5[p], 1);
         TextDrawSetShadow(Textdraw2048Spot5[p], 1);
         TextDrawUseBox(Textdraw2048Spot5[p], 1);
         TextDrawBoxColor(Textdraw2048Spot5[p], 100);
         TextDrawTextSize(Textdraw2048Spot5[p], 274.000000, 0.000000);
         TextDrawSetSelectable(Textdraw2048Spot5[p], 0);

         Textdraw2048Spot4[p] = TextDrawCreate(277.000000, 257.000000, "_");
         TextDrawBackgroundColor(Textdraw2048Spot4[p], 255);
         TextDrawFont(Textdraw2048Spot4[p], 1);
         TextDrawLetterSize(Textdraw2048Spot4[p], 0.500000, 2.099998);
         TextDrawColor(Textdraw2048Spot4[p], -1);
         TextDrawSetOutline(Textdraw2048Spot4[p], 0);
         TextDrawSetProportional(Textdraw2048Spot4[p], 1);
         TextDrawSetShadow(Textdraw2048Spot4[p], 1);
         TextDrawUseBox(Textdraw2048Spot4[p], 1);
         TextDrawBoxColor(Textdraw2048Spot4[p], 100);
         TextDrawTextSize(Textdraw2048Spot4[p], 232.000000, 0.000000);
         TextDrawSetSelectable(Textdraw2048Spot4[p], 0);

         Textdraw2048Spot11[p] = TextDrawCreate(403.000000, 288.000000, "_");
         TextDrawBackgroundColor(Textdraw2048Spot11[p], 255);
         TextDrawFont(Textdraw2048Spot11[p], 1);
         TextDrawLetterSize(Textdraw2048Spot11[p], 0.500000, 2.099998);
         TextDrawColor(Textdraw2048Spot11[p], -1);
         TextDrawSetOutline(Textdraw2048Spot11[p], 0);
         TextDrawSetProportional(Textdraw2048Spot11[p], 1);
         TextDrawSetShadow(Textdraw2048Spot11[p], 1);
         TextDrawUseBox(Textdraw2048Spot11[p], 1);
         TextDrawBoxColor(Textdraw2048Spot11[p], 100);
         TextDrawTextSize(Textdraw2048Spot11[p], 359.000000, 0.000000);
         TextDrawSetSelectable(Textdraw2048Spot11[p], 0);

         Textdraw2048Spot10[p] = TextDrawCreate(362.000000, 288.000000, "_");
         TextDrawBackgroundColor(Textdraw2048Spot10[p], 255);
         TextDrawFont(Textdraw2048Spot10[p], 1);
         TextDrawLetterSize(Textdraw2048Spot10[p], 0.500000, 2.099998);
         TextDrawColor(Textdraw2048Spot10[p], -1);
         TextDrawSetOutline(Textdraw2048Spot10[p], 0);
         TextDrawSetProportional(Textdraw2048Spot10[p], 1);
         TextDrawSetShadow(Textdraw2048Spot10[p], 1);
         TextDrawUseBox(Textdraw2048Spot10[p], 1);
         TextDrawBoxColor(Textdraw2048Spot10[p], 100);
         TextDrawTextSize(Textdraw2048Spot10[p], 316.000000, 0.000000);
         TextDrawSetSelectable(Textdraw2048Spot10[p], 0);

         Textdraw2048Spot9[p] = TextDrawCreate(319.000000, 288.000000, "_");
         TextDrawBackgroundColor(Textdraw2048Spot9[p], 255);
         TextDrawFont(Textdraw2048Spot9[p], 1);
         TextDrawLetterSize(Textdraw2048Spot9[p], 0.500000, 2.099998);
         TextDrawColor(Textdraw2048Spot9[p], -1);
         TextDrawSetOutline(Textdraw2048Spot9[p], 0);
         TextDrawSetProportional(Textdraw2048Spot9[p], 1);
         TextDrawSetShadow(Textdraw2048Spot9[p], 1);
         TextDrawUseBox(Textdraw2048Spot9[p], 1);
         TextDrawBoxColor(Textdraw2048Spot9[p], 100);
         TextDrawTextSize(Textdraw2048Spot9[p], 274.000000, 0.000000);
         TextDrawSetSelectable(Textdraw2048Spot9[p], 0);

         Textdraw2048Spot8[p] = TextDrawCreate(277.000000, 288.000000, "_");
         TextDrawBackgroundColor(Textdraw2048Spot8[p], 255);
         TextDrawFont(Textdraw2048Spot8[p], 1);
         TextDrawLetterSize(Textdraw2048Spot8[p], 0.500000, 2.099998);
         TextDrawColor(Textdraw2048Spot8[p], -1);
         TextDrawSetOutline(Textdraw2048Spot8[p], 0);
         TextDrawSetProportional(Textdraw2048Spot8[p], 1);
         TextDrawSetShadow(Textdraw2048Spot8[p], 1);
         TextDrawUseBox(Textdraw2048Spot8[p], 1);
         TextDrawBoxColor(Textdraw2048Spot8[p], 100);
         TextDrawTextSize(Textdraw2048Spot8[p], 232.000000, 0.000000);
         TextDrawSetSelectable(Textdraw2048Spot8[p], 0);

         Textdraw2048Spot15[p] = TextDrawCreate(403.000000, 319.000000, "_");
         TextDrawBackgroundColor(Textdraw2048Spot15[p], 255);
         TextDrawFont(Textdraw2048Spot15[p], 1);
         TextDrawLetterSize(Textdraw2048Spot15[p], 0.500000, 2.099998);
         TextDrawColor(Textdraw2048Spot15[p], -1);
         TextDrawSetOutline(Textdraw2048Spot15[p], 0);
         TextDrawSetProportional(Textdraw2048Spot15[p], 1);
         TextDrawSetShadow(Textdraw2048Spot15[p], 1);
         TextDrawUseBox(Textdraw2048Spot15[p], 1);
         TextDrawBoxColor(Textdraw2048Spot15[p], 100);
         TextDrawTextSize(Textdraw2048Spot15[p], 359.000000, 0.000000);
         TextDrawSetSelectable(Textdraw2048Spot15[p], 0);

         Textdraw2048Spot14[p] = TextDrawCreate(362.000000, 319.000000, "_");
         TextDrawBackgroundColor(Textdraw2048Spot14[p], 255);
         TextDrawFont(Textdraw2048Spot14[p], 1);
         TextDrawLetterSize(Textdraw2048Spot14[p], 0.500000, 2.099998);
         TextDrawColor(Textdraw2048Spot14[p], -1);
         TextDrawSetOutline(Textdraw2048Spot14[p], 0);
         TextDrawSetProportional(Textdraw2048Spot14[p], 1);
         TextDrawSetShadow(Textdraw2048Spot14[p], 1);
         TextDrawUseBox(Textdraw2048Spot14[p], 1);
         TextDrawBoxColor(Textdraw2048Spot14[p], 100);
         TextDrawTextSize(Textdraw2048Spot14[p], 316.000000, 0.000000);
         TextDrawSetSelectable(Textdraw2048Spot14[p], 0);

         Textdraw2048Spot13[p] = TextDrawCreate(319.000000, 319.000000, "_");
         TextDrawBackgroundColor(Textdraw2048Spot13[p], 255);
         TextDrawFont(Textdraw2048Spot13[p], 1);
         TextDrawLetterSize(Textdraw2048Spot13[p], 0.500000, 2.099998);
         TextDrawColor(Textdraw2048Spot13[p], -1);
         TextDrawSetOutline(Textdraw2048Spot13[p], 0);
         TextDrawSetProportional(Textdraw2048Spot13[p], 1);
         TextDrawSetShadow(Textdraw2048Spot13[p], 1);
         TextDrawUseBox(Textdraw2048Spot13[p], 1);
         TextDrawBoxColor(Textdraw2048Spot13[p], 100);
         TextDrawTextSize(Textdraw2048Spot13[p], 274.000000, 0.000000);
         TextDrawSetSelectable(Textdraw2048Spot13[p], 0);

         Textdraw2048Spot12[p] = TextDrawCreate(277.000000, 319.000000, "_");
         TextDrawBackgroundColor(Textdraw2048Spot12[p], 255);
         TextDrawFont(Textdraw2048Spot12[p], 1);
         TextDrawLetterSize(Textdraw2048Spot12[p], 0.500000, 2.099998);
         TextDrawColor(Textdraw2048Spot12[p], -1);
         TextDrawSetOutline(Textdraw2048Spot12[p], 0);
         TextDrawSetProportional(Textdraw2048Spot12[p], 1);
         TextDrawSetShadow(Textdraw2048Spot12[p], 1);
         TextDrawUseBox(Textdraw2048Spot12[p], 1);
         TextDrawBoxColor(Textdraw2048Spot12[p], 100);
         TextDrawTextSize(Textdraw2048Spot12[p], 232.000000, 0.000000);
         TextDrawSetSelectable(Textdraw2048Spot12[p], 0);

         Textdraw2048PlayerScore[p] = TextDrawCreate(342.000000, 176.000000, "_");
         TextDrawAlignment(Textdraw2048PlayerScore[p], 2);
         TextDrawBackgroundColor(Textdraw2048PlayerScore[p], 255);
         TextDrawFont(Textdraw2048PlayerScore[p], 2);
         TextDrawLetterSize(Textdraw2048PlayerScore[p], 0.259999, 0.799998);
         TextDrawColor(Textdraw2048PlayerScore[p], -1);
         TextDrawSetOutline(Textdraw2048PlayerScore[p], 0);
         TextDrawSetProportional(Textdraw2048PlayerScore[p], 1);
         TextDrawSetShadow(Textdraw2048PlayerScore[p], 0);
         TextDrawSetSelectable(Textdraw2048PlayerScore[p], 0);

         Textdraw2048PlayerBest[p] = TextDrawCreate(384.000000, 176.000000, "_");
         TextDrawAlignment(Textdraw2048PlayerBest[p], 2);
         TextDrawBackgroundColor(Textdraw2048PlayerBest[p], 255);
         TextDrawFont(Textdraw2048PlayerBest[p], 2);
         TextDrawLetterSize(Textdraw2048PlayerBest[p], 0.259999, 0.799998);
         TextDrawColor(Textdraw2048PlayerBest[p], -1);
         TextDrawSetOutline(Textdraw2048PlayerBest[p], 0);
         TextDrawSetProportional(Textdraw2048PlayerBest[p], 1);
         TextDrawSetShadow(Textdraw2048PlayerBest[p], 0);
         TextDrawSetSelectable(Textdraw2048PlayerBest[p], 0);
         
         TextdrawSpotNumber0[p] = TextDrawCreate(255.000000, 225.000000, "_");
         TextDrawAlignment(TextdrawSpotNumber0[p], 2);
         TextDrawBackgroundColor(TextdrawSpotNumber0[p], 255);
         TextDrawFont(TextdrawSpotNumber0[p], 1);
         TextDrawLetterSize(TextdrawSpotNumber0[p], 0.490000, 2.199999);
         TextDrawColor(TextdrawSpotNumber0[p], -1);
         TextDrawSetOutline(TextdrawSpotNumber0[p], 0);
         TextDrawSetProportional(TextdrawSpotNumber0[p], 1);
         TextDrawSetShadow(TextdrawSpotNumber0[p], 0);
         TextDrawSetSelectable(TextdrawSpotNumber0[p], 0);

         TextdrawSpotNumber1[p] = TextDrawCreate(297.000000, 225.000000, "_");
         TextDrawAlignment(TextdrawSpotNumber1[p], 2);
         TextDrawBackgroundColor(TextdrawSpotNumber1[p], 255);
         TextDrawFont(TextdrawSpotNumber1[p], 1);
         TextDrawLetterSize(TextdrawSpotNumber1[p], 0.490000, 2.199999);
         TextDrawColor(TextdrawSpotNumber1[p], -1);
         TextDrawSetOutline(TextdrawSpotNumber1[p], 0);
         TextDrawSetProportional(TextdrawSpotNumber1[p], 1);
         TextDrawSetShadow(TextdrawSpotNumber1[p], 0);
         TextDrawSetSelectable(TextdrawSpotNumber1[p], 0);

         TextdrawSpotNumber2[p] = TextDrawCreate(338.000000, 225.000000, "_");
         TextDrawAlignment(TextdrawSpotNumber2[p], 2);
         TextDrawBackgroundColor(TextdrawSpotNumber2[p], 255);
         TextDrawFont(TextdrawSpotNumber2[p], 1);
         TextDrawLetterSize(TextdrawSpotNumber2[p], 0.490000, 2.199999);
         TextDrawColor(TextdrawSpotNumber2[p], -1);
         TextDrawSetOutline(TextdrawSpotNumber2[p], 0);
         TextDrawSetProportional(TextdrawSpotNumber2[p], 1);
         TextDrawSetShadow(TextdrawSpotNumber2[p], 0);
         TextDrawSetSelectable(TextdrawSpotNumber2[p], 0);

         TextdrawSpotNumber3[p] = TextDrawCreate(381.000000, 225.000000, "_");
         TextDrawAlignment(TextdrawSpotNumber3[p], 2);
         TextDrawBackgroundColor(TextdrawSpotNumber3[p], 255);
         TextDrawFont(TextdrawSpotNumber3[p], 1);
         TextDrawLetterSize(TextdrawSpotNumber3[p], 0.490000, 2.199999);
         TextDrawColor(TextdrawSpotNumber3[p], -1);
         TextDrawSetOutline(TextdrawSpotNumber3[p], 0);
         TextDrawSetProportional(TextdrawSpotNumber3[p], 1);
         TextDrawSetShadow(TextdrawSpotNumber3[p], 0);
         TextDrawSetSelectable(TextdrawSpotNumber3[p], 0);

         TextdrawSpotNumber4[p] = TextDrawCreate(255.000000, 255.000000, "_");
         TextDrawAlignment(TextdrawSpotNumber4[p], 2);
         TextDrawBackgroundColor(TextdrawSpotNumber4[p], 255);
         TextDrawFont(TextdrawSpotNumber4[p], 1);
         TextDrawLetterSize(TextdrawSpotNumber4[p], 0.490000, 2.199999);
         TextDrawColor(TextdrawSpotNumber4[p], -1);
         TextDrawSetOutline(TextdrawSpotNumber4[p], 0);
         TextDrawSetProportional(TextdrawSpotNumber4[p], 1);
         TextDrawSetShadow(TextdrawSpotNumber4[p], 0);
         TextDrawSetSelectable(TextdrawSpotNumber4[p], 0);

         TextdrawSpotNumber5[p] = TextDrawCreate(297.000000, 255.000000, "_");
         TextDrawAlignment(TextdrawSpotNumber5[p], 2);
         TextDrawBackgroundColor(TextdrawSpotNumber5[p], 255);
         TextDrawFont(TextdrawSpotNumber5[p], 1);
         TextDrawLetterSize(TextdrawSpotNumber5[p], 0.490000, 2.199999);
         TextDrawColor(TextdrawSpotNumber5[p], -1);
         TextDrawSetOutline(TextdrawSpotNumber5[p], 0);
         TextDrawSetProportional(TextdrawSpotNumber5[p], 1);
         TextDrawSetShadow(TextdrawSpotNumber5[p], 0);
         TextDrawSetSelectable(TextdrawSpotNumber5[p], 0);

         TextdrawSpotNumber6[p] = TextDrawCreate(338.000000, 255.000000, "_");
         TextDrawAlignment(TextdrawSpotNumber6[p], 2);
         TextDrawBackgroundColor(TextdrawSpotNumber6[p], 255);
         TextDrawFont(TextdrawSpotNumber6[p], 1);
         TextDrawLetterSize(TextdrawSpotNumber6[p], 0.490000, 2.199999);
         TextDrawColor(TextdrawSpotNumber6[p], -1);
         TextDrawSetOutline(TextdrawSpotNumber6[p], 0);
         TextDrawSetProportional(TextdrawSpotNumber6[p], 1);
         TextDrawSetShadow(TextdrawSpotNumber6[p], 0);
         TextDrawSetSelectable(TextdrawSpotNumber6[p], 0);

         TextdrawSpotNumber7[p] = TextDrawCreate(380.000000, 255.000000, "_");
         TextDrawAlignment(TextdrawSpotNumber7[p], 2);
         TextDrawBackgroundColor(TextdrawSpotNumber7[p], 255);
         TextDrawFont(TextdrawSpotNumber7[p], 1);
         TextDrawLetterSize(TextdrawSpotNumber7[p], 0.490000, 2.199999);
         TextDrawColor(TextdrawSpotNumber7[p], -1);
         TextDrawSetOutline(TextdrawSpotNumber7[p], 0);
         TextDrawSetProportional(TextdrawSpotNumber7[p], 1);
         TextDrawSetShadow(TextdrawSpotNumber7[p], 0);
         TextDrawSetSelectable(TextdrawSpotNumber7[p], 0);

         TextdrawSpotNumber8[p] = TextDrawCreate(255.000000, 287.000000, "_");
         TextDrawAlignment(TextdrawSpotNumber8[p], 2);
         TextDrawBackgroundColor(TextdrawSpotNumber8[p], 255);
         TextDrawFont(TextdrawSpotNumber8[p], 1);
         TextDrawLetterSize(TextdrawSpotNumber8[p], 0.490000, 2.199999);
         TextDrawColor(TextdrawSpotNumber8[p], -1);
         TextDrawSetOutline(TextdrawSpotNumber8[p], 0);
         TextDrawSetProportional(TextdrawSpotNumber8[p], 1);
         TextDrawSetShadow(TextdrawSpotNumber8[p], 0);
         TextDrawSetSelectable(TextdrawSpotNumber8[p], 0);

         TextdrawSpotNumber9[p] = TextDrawCreate(297.000000, 287.000000, "_");
         TextDrawAlignment(TextdrawSpotNumber9[p], 2);
         TextDrawBackgroundColor(TextdrawSpotNumber9[p], 255);
         TextDrawFont(TextdrawSpotNumber9[p], 1);
         TextDrawLetterSize(TextdrawSpotNumber9[p], 0.490000, 2.199999);
         TextDrawColor(TextdrawSpotNumber9[p], -1);
         TextDrawSetOutline(TextdrawSpotNumber9[p], 0);
         TextDrawSetProportional(TextdrawSpotNumber9[p], 1);
         TextDrawSetShadow(TextdrawSpotNumber9[p], 0);
         TextDrawSetSelectable(TextdrawSpotNumber9[p], 0);

         TextdrawSpotNumber10[p] = TextDrawCreate(338.000000, 287.000000, "_");
         TextDrawAlignment(TextdrawSpotNumber10[p], 2);
         TextDrawBackgroundColor(TextdrawSpotNumber10[p], 255);
         TextDrawFont(TextdrawSpotNumber10[p], 1);
         TextDrawLetterSize(TextdrawSpotNumber10[p], 0.490000, 2.199999);
         TextDrawColor(TextdrawSpotNumber10[p], -1);
         TextDrawSetOutline(TextdrawSpotNumber10[p], 0);
         TextDrawSetProportional(TextdrawSpotNumber10[p], 1);
         TextDrawSetShadow(TextdrawSpotNumber10[p], 0);
         TextDrawSetSelectable(TextdrawSpotNumber10[p], 0);

         TextdrawSpotNumber11[p] = TextDrawCreate(380.000000, 287.000000, "_");
         TextDrawAlignment(TextdrawSpotNumber11[p], 2);
         TextDrawBackgroundColor(TextdrawSpotNumber11[p], 255);
         TextDrawFont(TextdrawSpotNumber11[p], 1);
         TextDrawLetterSize(TextdrawSpotNumber11[p], 0.490000, 2.199999);
         TextDrawColor(TextdrawSpotNumber11[p], -1);
         TextDrawSetOutline(TextdrawSpotNumber11[p], 0);
         TextDrawSetProportional(TextdrawSpotNumber11[p], 1);
         TextDrawSetShadow(TextdrawSpotNumber11[p], 0);
         TextDrawSetSelectable(TextdrawSpotNumber11[p], 0);

         TextdrawSpotNumber12[p] = TextDrawCreate(254.000000, 317.000000, "_");
         TextDrawAlignment(TextdrawSpotNumber12[p], 2);
         TextDrawBackgroundColor(TextdrawSpotNumber12[p], 255);
         TextDrawFont(TextdrawSpotNumber12[p], 1);
         TextDrawLetterSize(TextdrawSpotNumber12[p], 0.490000, 2.199999);
         TextDrawColor(TextdrawSpotNumber12[p], -1);
         TextDrawSetOutline(TextdrawSpotNumber12[p], 0);
         TextDrawSetProportional(TextdrawSpotNumber12[p], 1);
         TextDrawSetShadow(TextdrawSpotNumber12[p], 0);
         TextDrawSetSelectable(TextdrawSpotNumber12[p], 0);

         TextdrawSpotNumber13[p] = TextDrawCreate(296.000000, 317.000000, "_");
         TextDrawAlignment(TextdrawSpotNumber13[p], 2);
         TextDrawBackgroundColor(TextdrawSpotNumber13[p], 255);
         TextDrawFont(TextdrawSpotNumber13[p], 1);
         TextDrawLetterSize(TextdrawSpotNumber13[p], 0.490000, 2.199999);
         TextDrawColor(TextdrawSpotNumber13[p], -1);
         TextDrawSetOutline(TextdrawSpotNumber13[p], 0);
         TextDrawSetProportional(TextdrawSpotNumber13[p], 1);
         TextDrawSetShadow(TextdrawSpotNumber13[p], 0);
         TextDrawSetSelectable(TextdrawSpotNumber13[p], 0);

         TextdrawSpotNumber14[p] = TextDrawCreate(339.000000, 317.000000, "_");
         TextDrawAlignment(TextdrawSpotNumber14[p], 2);
         TextDrawBackgroundColor(TextdrawSpotNumber14[p], 255);
         TextDrawFont(TextdrawSpotNumber14[p], 1);
         TextDrawLetterSize(TextdrawSpotNumber14[p], 0.490000, 2.199999);
         TextDrawColor(TextdrawSpotNumber14[p], -1);
         TextDrawSetOutline(TextdrawSpotNumber14[p], 0);
         TextDrawSetProportional(TextdrawSpotNumber14[p], 1);
         TextDrawSetShadow(TextdrawSpotNumber14[p], 0);
         TextDrawSetSelectable(TextdrawSpotNumber14[p], 0);

         TextdrawSpotNumber15[p] = TextDrawCreate(380.000000, 317.000000, "_");
         TextDrawAlignment(TextdrawSpotNumber15[p], 2);
         TextDrawBackgroundColor(TextdrawSpotNumber15[p], 255);
         TextDrawFont(TextdrawSpotNumber15[p], 1);
         TextDrawLetterSize(TextdrawSpotNumber15[p], 0.490000, 2.199999);
         TextDrawColor(TextdrawSpotNumber15[p], -1);
         TextDrawSetOutline(TextdrawSpotNumber15[p], 0);
         TextDrawSetProportional(TextdrawSpotNumber15[p], 1);
         TextDrawSetShadow(TextdrawSpotNumber15[p], 0);
         TextDrawSetSelectable(TextdrawSpotNumber15[p], 0);
        }
    }
   return 1;
}

public OnFilterScriptExit()
{
   TextDrawDestroy(Textdraw2048Background1);
   TextDrawDestroy(Textdraw2048Background2);
   TextDrawDestroy(Textdraw2048Background3);
   TextDrawDestroy(Textdraw2048Background4);
   TextDrawDestroy(Textdraw2048Background5);
   TextDrawDestroy(Textdraw2048Background6);
   TextDrawDestroy(Textdraw2048Up);
   TextDrawDestroy(Textdraw2048Down);
   TextDrawDestroy(Textdraw2048Left);
   TextDrawDestroy(Textdraw2048Right);
   TextDrawDestroy(Textdraw2048Score);
   TextDrawDestroy(Textdraw2048Best);
   for(new i = 0; i < MAX_PLAYERS; i ++)
   {
       if(IsPlayerConnected(i))
       {
            TextDrawDestroy(Textdraw2048Spot0[i]);
         TextDrawDestroy(Textdraw2048Spot1[i]);
         TextDrawDestroy(Textdraw2048Spot2[i]);
         TextDrawDestroy(Textdraw2048Spot3[i]);
         TextDrawDestroy(Textdraw2048Spot4[i]);
         TextDrawDestroy(Textdraw2048Spot5[i]);
         TextDrawDestroy(Textdraw2048Spot6[i]);
         TextDrawDestroy(Textdraw2048Spot7[i]);
         TextDrawDestroy(Textdraw2048Spot8[i]);
         TextDrawDestroy(Textdraw2048Spot9[i]);
         TextDrawDestroy(Textdraw2048Spot10[i]);
         TextDrawDestroy(Textdraw2048Spot11[i]);
         TextDrawDestroy(Textdraw2048Spot12[i]);
         TextDrawDestroy(Textdraw2048Spot13[i]);
         TextDrawDestroy(Textdraw2048Spot14[i]);
         TextDrawDestroy(Textdraw2048Spot15[i]);
         TextDrawDestroy(Textdraw2048PlayerScore[i]);
         TextDrawDestroy(Textdraw2048PlayerBest[i]);
         
         TextDrawDestroy(TextdrawSpotNumber0[i]);
         TextDrawDestroy(TextdrawSpotNumber1[i]);
         TextDrawDestroy(TextdrawSpotNumber2[i]);
         TextDrawDestroy(TextdrawSpotNumber3[i]);
         TextDrawDestroy(TextdrawSpotNumber4[i]);
         TextDrawDestroy(TextdrawSpotNumber5[i]);
         TextDrawDestroy(TextdrawSpotNumber6[i]);
         TextDrawDestroy(TextdrawSpotNumber7[i]);
         TextDrawDestroy(TextdrawSpotNumber8[i]);
         TextDrawDestroy(TextdrawSpotNumber9[i]);
         TextDrawDestroy(TextdrawSpotNumber10[i]);
         TextDrawDestroy(TextdrawSpotNumber11[i]);
         TextDrawDestroy(TextdrawSpotNumber12[i]);
         TextDrawDestroy(TextdrawSpotNumber13[i]);
         TextDrawDestroy(TextdrawSpotNumber14[i]);
         TextDrawDestroy(TextdrawSpotNumber15[i]);
       }
   }
   return 1;
}

public OnPlayerConnect(playerid)
{
    for(new s = 0; s < 16; s++)
   {
       Spot[playerid][s] = 0;
     }
     
     PlayerScore[playerid] = 0;

   Textdraw2048Spot3[playerid] = TextDrawCreate(403.000000, 226.000000, "_");
   TextDrawBackgroundColor(Textdraw2048Spot3[playerid], 255);
   TextDrawFont(Textdraw2048Spot3[playerid], 1);
   TextDrawLetterSize(Textdraw2048Spot3[playerid], 0.500000, 2.099998);
   TextDrawColor(Textdraw2048Spot3[playerid], -1);
   TextDrawSetOutline(Textdraw2048Spot3[playerid], 0);
   TextDrawSetProportional(Textdraw2048Spot3[playerid], 1);
   TextDrawSetShadow(Textdraw2048Spot3[playerid], 1);
   TextDrawUseBox(Textdraw2048Spot3[playerid], 1);
   TextDrawBoxColor(Textdraw2048Spot3[playerid], 100);
   TextDrawTextSize(Textdraw2048Spot3[playerid], 359.000000, 0.000000);
   TextDrawSetSelectable(Textdraw2048Spot3[playerid], 0);

   Textdraw2048Spot2[playerid] = TextDrawCreate(362.000000, 226.000000, "_");
   TextDrawBackgroundColor(Textdraw2048Spot2[playerid], 255);
   TextDrawFont(Textdraw2048Spot2[playerid], 1);
   TextDrawLetterSize(Textdraw2048Spot2[playerid], 0.500000, 2.099998);
   TextDrawColor(Textdraw2048Spot2[playerid], -1);
   TextDrawSetOutline(Textdraw2048Spot2[playerid], 0);
   TextDrawSetProportional(Textdraw2048Spot2[playerid], 1);
   TextDrawSetShadow(Textdraw2048Spot2[playerid], 1);
   TextDrawUseBox(Textdraw2048Spot2[playerid], 1);
   TextDrawBoxColor(Textdraw2048Spot2[playerid], 100);
   TextDrawTextSize(Textdraw2048Spot2[playerid], 316.000000, 0.000000);
   TextDrawSetSelectable(Textdraw2048Spot2[playerid], 0);

   Textdraw2048Spot1[playerid] = TextDrawCreate(319.000000, 226.000000, "_");
   TextDrawBackgroundColor(Textdraw2048Spot1[playerid], 255);
   TextDrawFont(Textdraw2048Spot1[playerid], 1);
   TextDrawLetterSize(Textdraw2048Spot1[playerid], 0.500000, 2.099998);
   TextDrawColor(Textdraw2048Spot1[playerid], -1);
   TextDrawSetOutline(Textdraw2048Spot1[playerid], 0);
   TextDrawSetProportional(Textdraw2048Spot1[playerid], 1);
   TextDrawSetShadow(Textdraw2048Spot1[playerid], 1);
   TextDrawUseBox(Textdraw2048Spot1[playerid], 1);
   TextDrawBoxColor(Textdraw2048Spot1[playerid], 100);
   TextDrawTextSize(Textdraw2048Spot1[playerid], 274.000000, 0.000000);
   TextDrawSetSelectable(Textdraw2048Spot1[playerid], 0);

   Textdraw2048Spot0[playerid] = TextDrawCreate(277.000000, 226.000000, "_");
   TextDrawBackgroundColor(Textdraw2048Spot0[playerid], 255);
   TextDrawFont(Textdraw2048Spot0[playerid], 1);
   TextDrawLetterSize(Textdraw2048Spot0[playerid], 0.500000, 2.099998);
   TextDrawColor(Textdraw2048Spot0[playerid], -1);
   TextDrawSetOutline(Textdraw2048Spot0[playerid], 0);
   TextDrawSetProportional(Textdraw2048Spot0[playerid], 1);
   TextDrawSetShadow(Textdraw2048Spot0[playerid], 1);
   TextDrawUseBox(Textdraw2048Spot0[playerid], 1);
   TextDrawBoxColor(Textdraw2048Spot0[playerid], 100);
   TextDrawTextSize(Textdraw2048Spot0[playerid], 232.000000, 0.000000);
   TextDrawSetSelectable(Textdraw2048Spot0[playerid], 0);

   Textdraw2048Spot7[playerid] = TextDrawCreate(403.000000, 257.000000, "_");
   TextDrawBackgroundColor(Textdraw2048Spot7[playerid], 255);
   TextDrawFont(Textdraw2048Spot7[playerid], 1);
   TextDrawLetterSize(Textdraw2048Spot7[playerid], 0.500000, 2.099998);
   TextDrawColor(Textdraw2048Spot7[playerid], -1);
   TextDrawSetOutline(Textdraw2048Spot7[playerid], 0);
   TextDrawSetProportional(Textdraw2048Spot7[playerid], 1);
   TextDrawSetShadow(Textdraw2048Spot7[playerid], 1);
   TextDrawUseBox(Textdraw2048Spot7[playerid], 1);
   TextDrawBoxColor(Textdraw2048Spot7[playerid], 100);
   TextDrawTextSize(Textdraw2048Spot7[playerid], 359.000000, 0.000000);
   TextDrawSetSelectable(Textdraw2048Spot7[playerid], 0);

   Textdraw2048Spot6[playerid] = TextDrawCreate(362.000000, 257.000000, "_");
   TextDrawBackgroundColor(Textdraw2048Spot6[playerid], 255);
   TextDrawFont(Textdraw2048Spot6[playerid], 1);
   TextDrawLetterSize(Textdraw2048Spot6[playerid], 0.500000, 2.099998);
   TextDrawColor(Textdraw2048Spot6[playerid], -1);
   TextDrawSetOutline(Textdraw2048Spot6[playerid], 0);
   TextDrawSetProportional(Textdraw2048Spot6[playerid], 1);
   TextDrawSetShadow(Textdraw2048Spot6[playerid], 1);
   TextDrawUseBox(Textdraw2048Spot6[playerid], 1);
   TextDrawBoxColor(Textdraw2048Spot6[playerid], 100);
   TextDrawTextSize(Textdraw2048Spot6[playerid], 316.000000, 0.000000);
   TextDrawSetSelectable(Textdraw2048Spot6[playerid], 0);

   Textdraw2048Spot5[playerid] = TextDrawCreate(319.000000, 257.000000, "_");
   TextDrawBackgroundColor(Textdraw2048Spot5[playerid], 255);
   TextDrawFont(Textdraw2048Spot5[playerid], 1);
   TextDrawLetterSize(Textdraw2048Spot5[playerid], 0.500000, 2.099998);
   TextDrawColor(Textdraw2048Spot5[playerid], -1);
   TextDrawSetOutline(Textdraw2048Spot5[playerid], 0);
   TextDrawSetProportional(Textdraw2048Spot5[playerid], 1);
   TextDrawSetShadow(Textdraw2048Spot5[playerid], 1);
   TextDrawUseBox(Textdraw2048Spot5[playerid], 1);
   TextDrawBoxColor(Textdraw2048Spot5[playerid], 100);
   TextDrawTextSize(Textdraw2048Spot5[playerid], 274.000000, 0.000000);
   TextDrawSetSelectable(Textdraw2048Spot5[playerid], 0);

   Textdraw2048Spot4[playerid] = TextDrawCreate(277.000000, 257.000000, "_");
   TextDrawBackgroundColor(Textdraw2048Spot4[playerid], 255);
   TextDrawFont(Textdraw2048Spot4[playerid], 1);
   TextDrawLetterSize(Textdraw2048Spot4[playerid], 0.500000, 2.099998);
   TextDrawColor(Textdraw2048Spot4[playerid], -1);
   TextDrawSetOutline(Textdraw2048Spot4[playerid], 0);
   TextDrawSetProportional(Textdraw2048Spot4[playerid], 1);
   TextDrawSetShadow(Textdraw2048Spot4[playerid], 1);
   TextDrawUseBox(Textdraw2048Spot4[playerid], 1);
   TextDrawBoxColor(Textdraw2048Spot4[playerid], 100);
   TextDrawTextSize(Textdraw2048Spot4[playerid], 232.000000, 0.000000);
   TextDrawSetSelectable(Textdraw2048Spot4[playerid], 0);

   Textdraw2048Spot11[playerid] = TextDrawCreate(403.000000, 288.000000, "_");
   TextDrawBackgroundColor(Textdraw2048Spot11[playerid], 255);
   TextDrawFont(Textdraw2048Spot11[playerid], 1);
   TextDrawLetterSize(Textdraw2048Spot11[playerid], 0.500000, 2.099998);
   TextDrawColor(Textdraw2048Spot11[playerid], -1);
   TextDrawSetOutline(Textdraw2048Spot11[playerid], 0);
   TextDrawSetProportional(Textdraw2048Spot11[playerid], 1);
   TextDrawSetShadow(Textdraw2048Spot11[playerid], 1);
   TextDrawUseBox(Textdraw2048Spot11[playerid], 1);
   TextDrawBoxColor(Textdraw2048Spot11[playerid], 100);
   TextDrawTextSize(Textdraw2048Spot11[playerid], 359.000000, 0.000000);
   TextDrawSetSelectable(Textdraw2048Spot11[playerid], 0);

   Textdraw2048Spot10[playerid] = TextDrawCreate(362.000000, 288.000000, "_");
   TextDrawBackgroundColor(Textdraw2048Spot10[playerid], 255);
   TextDrawFont(Textdraw2048Spot10[playerid], 1);
   TextDrawLetterSize(Textdraw2048Spot10[playerid], 0.500000, 2.099998);
   TextDrawColor(Textdraw2048Spot10[playerid], -1);
   TextDrawSetOutline(Textdraw2048Spot10[playerid], 0);
   TextDrawSetProportional(Textdraw2048Spot10[playerid], 1);
   TextDrawSetShadow(Textdraw2048Spot10[playerid], 1);
   TextDrawUseBox(Textdraw2048Spot10[playerid], 1);
   TextDrawBoxColor(Textdraw2048Spot10[playerid], 100);
   TextDrawTextSize(Textdraw2048Spot10[playerid], 316.000000, 0.000000);
   TextDrawSetSelectable(Textdraw2048Spot10[playerid], 0);

   Textdraw2048Spot9[playerid] = TextDrawCreate(319.000000, 288.000000, "_");
   TextDrawBackgroundColor(Textdraw2048Spot9[playerid], 255);
   TextDrawFont(Textdraw2048Spot9[playerid], 1);
   TextDrawLetterSize(Textdraw2048Spot9[playerid], 0.500000, 2.099998);
   TextDrawColor(Textdraw2048Spot9[playerid], -1);
   TextDrawSetOutline(Textdraw2048Spot9[playerid], 0);
   TextDrawSetProportional(Textdraw2048Spot9[playerid], 1);
   TextDrawSetShadow(Textdraw2048Spot9[playerid], 1);
   TextDrawUseBox(Textdraw2048Spot9[playerid], 1);
   TextDrawBoxColor(Textdraw2048Spot9[playerid], 100);
   TextDrawTextSize(Textdraw2048Spot9[playerid], 274.000000, 0.000000);
   TextDrawSetSelectable(Textdraw2048Spot9[playerid], 0);

   Textdraw2048Spot8[playerid] = TextDrawCreate(277.000000, 288.000000, "_");
   TextDrawBackgroundColor(Textdraw2048Spot8[playerid], 255);
   TextDrawFont(Textdraw2048Spot8[playerid], 1);
   TextDrawLetterSize(Textdraw2048Spot8[playerid], 0.500000, 2.099998);
   TextDrawColor(Textdraw2048Spot8[playerid], -1);
   TextDrawSetOutline(Textdraw2048Spot8[playerid], 0);
   TextDrawSetProportional(Textdraw2048Spot8[playerid], 1);
   TextDrawSetShadow(Textdraw2048Spot8[playerid], 1);
   TextDrawUseBox(Textdraw2048Spot8[playerid], 1);
   TextDrawBoxColor(Textdraw2048Spot8[playerid], 100);
   TextDrawTextSize(Textdraw2048Spot8[playerid], 232.000000, 0.000000);
   TextDrawSetSelectable(Textdraw2048Spot8[playerid], 0);

   Textdraw2048Spot15[playerid] = TextDrawCreate(403.000000, 319.000000, "_");
   TextDrawBackgroundColor(Textdraw2048Spot15[playerid], 255);
   TextDrawFont(Textdraw2048Spot15[playerid], 1);
   TextDrawLetterSize(Textdraw2048Spot15[playerid], 0.500000, 2.099998);
   TextDrawColor(Textdraw2048Spot15[playerid], -1);
   TextDrawSetOutline(Textdraw2048Spot15[playerid], 0);
   TextDrawSetProportional(Textdraw2048Spot15[playerid], 1);
   TextDrawSetShadow(Textdraw2048Spot15[playerid], 1);
   TextDrawUseBox(Textdraw2048Spot15[playerid], 1);
   TextDrawBoxColor(Textdraw2048Spot15[playerid], 100);
   TextDrawTextSize(Textdraw2048Spot15[playerid], 359.000000, 0.000000);
   TextDrawSetSelectable(Textdraw2048Spot15[playerid], 0);

   Textdraw2048Spot14[playerid] = TextDrawCreate(362.000000, 319.000000, "_");
   TextDrawBackgroundColor(Textdraw2048Spot14[playerid], 255);
   TextDrawFont(Textdraw2048Spot14[playerid], 1);
   TextDrawLetterSize(Textdraw2048Spot14[playerid], 0.500000, 2.099998);
   TextDrawColor(Textdraw2048Spot14[playerid], -1);
   TextDrawSetOutline(Textdraw2048Spot14[playerid], 0);
   TextDrawSetProportional(Textdraw2048Spot14[playerid], 1);
   TextDrawSetShadow(Textdraw2048Spot14[playerid], 1);
   TextDrawUseBox(Textdraw2048Spot14[playerid], 1);
   TextDrawBoxColor(Textdraw2048Spot14[playerid], 100);
   TextDrawTextSize(Textdraw2048Spot14[playerid], 316.000000, 0.000000);
   TextDrawSetSelectable(Textdraw2048Spot14[playerid], 0);

   Textdraw2048Spot13[playerid] = TextDrawCreate(319.000000, 319.000000, "_");
   TextDrawBackgroundColor(Textdraw2048Spot13[playerid], 255);
   TextDrawFont(Textdraw2048Spot13[playerid], 1);
   TextDrawLetterSize(Textdraw2048Spot13[playerid], 0.500000, 2.099998);
   TextDrawColor(Textdraw2048Spot13[playerid], -1);
   TextDrawSetOutline(Textdraw2048Spot13[playerid], 0);
   TextDrawSetProportional(Textdraw2048Spot13[playerid], 1);
   TextDrawSetShadow(Textdraw2048Spot13[playerid], 1);
   TextDrawUseBox(Textdraw2048Spot13[playerid], 1);
   TextDrawBoxColor(Textdraw2048Spot13[playerid], 100);
   TextDrawTextSize(Textdraw2048Spot13[playerid], 274.000000, 0.000000);
   TextDrawSetSelectable(Textdraw2048Spot13[playerid], 0);

   Textdraw2048Spot12[playerid] = TextDrawCreate(277.000000, 319.000000, "_");
   TextDrawBackgroundColor(Textdraw2048Spot12[playerid], 255);
   TextDrawFont(Textdraw2048Spot12[playerid], 1);
   TextDrawLetterSize(Textdraw2048Spot12[playerid], 0.500000, 2.099998);
   TextDrawColor(Textdraw2048Spot12[playerid], -1);
   TextDrawSetOutline(Textdraw2048Spot12[playerid], 0);
   TextDrawSetProportional(Textdraw2048Spot12[playerid], 1);
   TextDrawSetShadow(Textdraw2048Spot12[playerid], 1);
   TextDrawUseBox(Textdraw2048Spot12[playerid], 1);
   TextDrawBoxColor(Textdraw2048Spot12[playerid], 100);
   TextDrawTextSize(Textdraw2048Spot12[playerid], 232.000000, 0.000000);
   TextDrawSetSelectable(Textdraw2048Spot12[playerid], 0);
   
   Textdraw2048PlayerScore[playerid] = TextDrawCreate(342.000000, 176.000000, "_");
   TextDrawAlignment(Textdraw2048PlayerScore[playerid], 2);
   TextDrawBackgroundColor(Textdraw2048PlayerScore[playerid], 255);
   TextDrawFont(Textdraw2048PlayerScore[playerid], 2);
   TextDrawLetterSize(Textdraw2048PlayerScore[playerid], 0.259999, 0.799998);
   TextDrawColor(Textdraw2048PlayerScore[playerid], -1);
   TextDrawSetOutline(Textdraw2048PlayerScore[playerid], 0);
   TextDrawSetProportional(Textdraw2048PlayerScore[playerid], 1);
   TextDrawSetShadow(Textdraw2048PlayerScore[playerid], 0);
   TextDrawSetSelectable(Textdraw2048PlayerScore[playerid], 0);

   Textdraw2048PlayerBest[playerid] = TextDrawCreate(384.000000, 176.000000, "_");
   TextDrawAlignment(Textdraw2048PlayerBest[playerid], 2);
   TextDrawBackgroundColor(Textdraw2048PlayerBest[playerid], 255);
   TextDrawFont(Textdraw2048PlayerBest[playerid], 2);
   TextDrawLetterSize(Textdraw2048PlayerBest[playerid], 0.259999, 0.799998);
   TextDrawColor(Textdraw2048PlayerBest[playerid], -1);
   TextDrawSetOutline(Textdraw2048PlayerBest[playerid], 0);
   TextDrawSetProportional(Textdraw2048PlayerBest[playerid], 1);
   TextDrawSetShadow(Textdraw2048PlayerBest[playerid], 0);
   TextDrawSetSelectable(Textdraw2048PlayerBest[playerid], 0);
   
   TextdrawSpotNumber0[playerid] = TextDrawCreate(255.000000, 225.000000, "_");
   TextDrawAlignment(TextdrawSpotNumber0[playerid], 2);
   TextDrawBackgroundColor(TextdrawSpotNumber0[playerid], 255);
   TextDrawFont(TextdrawSpotNumber0[playerid], 1);
   TextDrawLetterSize(TextdrawSpotNumber0[playerid], 0.490000, 2.199999);
   TextDrawColor(TextdrawSpotNumber0[playerid], -1);
   TextDrawSetOutline(TextdrawSpotNumber0[playerid], 0);
   TextDrawSetProportional(TextdrawSpotNumber0[playerid], 1);
   TextDrawSetShadow(TextdrawSpotNumber0[playerid], 0);
   TextDrawSetSelectable(TextdrawSpotNumber0[playerid], 0);

   TextdrawSpotNumber1[playerid] = TextDrawCreate(297.000000, 225.000000, "_");
   TextDrawAlignment(TextdrawSpotNumber1[playerid], 2);
   TextDrawBackgroundColor(TextdrawSpotNumber1[playerid], 255);
   TextDrawFont(TextdrawSpotNumber1[playerid], 1);
   TextDrawLetterSize(TextdrawSpotNumber1[playerid], 0.490000, 2.199999);
   TextDrawColor(TextdrawSpotNumber1[playerid], -1);
   TextDrawSetOutline(TextdrawSpotNumber1[playerid], 0);
   TextDrawSetProportional(TextdrawSpotNumber1[playerid], 1);
   TextDrawSetShadow(TextdrawSpotNumber1[playerid], 0);
   TextDrawSetSelectable(TextdrawSpotNumber1[playerid], 0);

   TextdrawSpotNumber2[playerid] = TextDrawCreate(338.000000, 225.000000, "_");
   TextDrawAlignment(TextdrawSpotNumber2[playerid], 2);
   TextDrawBackgroundColor(TextdrawSpotNumber2[playerid], 255);
   TextDrawFont(TextdrawSpotNumber2[playerid], 1);
   TextDrawLetterSize(TextdrawSpotNumber2[playerid], 0.490000, 2.199999);
   TextDrawColor(TextdrawSpotNumber2[playerid], -1);
   TextDrawSetOutline(TextdrawSpotNumber2[playerid], 0);
   TextDrawSetProportional(TextdrawSpotNumber2[playerid], 1);
   TextDrawSetShadow(TextdrawSpotNumber2[playerid], 0);
   TextDrawSetSelectable(TextdrawSpotNumber2[playerid], 0);

   TextdrawSpotNumber3[playerid] = TextDrawCreate(381.000000, 225.000000, "_");
   TextDrawAlignment(TextdrawSpotNumber3[playerid], 2);
   TextDrawBackgroundColor(TextdrawSpotNumber3[playerid], 255);
   TextDrawFont(TextdrawSpotNumber3[playerid], 1);
   TextDrawLetterSize(TextdrawSpotNumber3[playerid], 0.490000, 2.199999);
   TextDrawColor(TextdrawSpotNumber3[playerid], -1);
   TextDrawSetOutline(TextdrawSpotNumber3[playerid], 0);
   TextDrawSetProportional(TextdrawSpotNumber3[playerid], 1);
   TextDrawSetShadow(TextdrawSpotNumber3[playerid], 0);
   TextDrawSetSelectable(TextdrawSpotNumber3[playerid], 0);

   TextdrawSpotNumber4[playerid] = TextDrawCreate(255.000000, 255.000000, "_");
   TextDrawAlignment(TextdrawSpotNumber4[playerid], 2);
   TextDrawBackgroundColor(TextdrawSpotNumber4[playerid], 255);
   TextDrawFont(TextdrawSpotNumber4[playerid], 1);
   TextDrawLetterSize(TextdrawSpotNumber4[playerid], 0.490000, 2.199999);
   TextDrawColor(TextdrawSpotNumber4[playerid], -1);
   TextDrawSetOutline(TextdrawSpotNumber4[playerid], 0);
   TextDrawSetProportional(TextdrawSpotNumber4[playerid], 1);
   TextDrawSetShadow(TextdrawSpotNumber4[playerid], 0);
   TextDrawSetSelectable(TextdrawSpotNumber4[playerid], 0);

   TextdrawSpotNumber5[playerid] = TextDrawCreate(297.000000, 255.000000, "_");
   TextDrawAlignment(TextdrawSpotNumber5[playerid], 2);
   TextDrawBackgroundColor(TextdrawSpotNumber5[playerid], 255);
   TextDrawFont(TextdrawSpotNumber5[playerid], 1);
   TextDrawLetterSize(TextdrawSpotNumber5[playerid], 0.490000, 2.199999);
   TextDrawColor(TextdrawSpotNumber5[playerid], -1);
   TextDrawSetOutline(TextdrawSpotNumber5[playerid], 0);
   TextDrawSetProportional(TextdrawSpotNumber5[playerid], 1);
   TextDrawSetShadow(TextdrawSpotNumber5[playerid], 0);
   TextDrawSetSelectable(TextdrawSpotNumber5[playerid], 0);

   TextdrawSpotNumber6[playerid] = TextDrawCreate(338.000000, 255.000000, "_");
   TextDrawAlignment(TextdrawSpotNumber6[playerid], 2);
   TextDrawBackgroundColor(TextdrawSpotNumber6[playerid], 255);
   TextDrawFont(TextdrawSpotNumber6[playerid], 1);
   TextDrawLetterSize(TextdrawSpotNumber6[playerid], 0.490000, 2.199999);
   TextDrawColor(TextdrawSpotNumber6[playerid], -1);
   TextDrawSetOutline(TextdrawSpotNumber6[playerid], 0);
   TextDrawSetProportional(TextdrawSpotNumber6[playerid], 1);
   TextDrawSetShadow(TextdrawSpotNumber6[playerid], 0);
   TextDrawSetSelectable(TextdrawSpotNumber6[playerid], 0);

   TextdrawSpotNumber7[playerid] = TextDrawCreate(380.000000, 255.000000, "_");
   TextDrawAlignment(TextdrawSpotNumber7[playerid], 2);
   TextDrawBackgroundColor(TextdrawSpotNumber7[playerid], 255);
   TextDrawFont(TextdrawSpotNumber7[playerid], 1);
   TextDrawLetterSize(TextdrawSpotNumber7[playerid], 0.490000, 2.199999);
   TextDrawColor(TextdrawSpotNumber7[playerid], -1);
   TextDrawSetOutline(TextdrawSpotNumber7[playerid], 0);
   TextDrawSetProportional(TextdrawSpotNumber7[playerid], 1);
   TextDrawSetShadow(TextdrawSpotNumber7[playerid], 0);
   TextDrawSetSelectable(TextdrawSpotNumber7[playerid], 0);

   TextdrawSpotNumber8[playerid] = TextDrawCreate(255.000000, 287.000000, "_");
   TextDrawAlignment(TextdrawSpotNumber8[playerid], 2);
   TextDrawBackgroundColor(TextdrawSpotNumber8[playerid], 255);
   TextDrawFont(TextdrawSpotNumber8[playerid], 1);
   TextDrawLetterSize(TextdrawSpotNumber8[playerid], 0.490000, 2.199999);
   TextDrawColor(TextdrawSpotNumber8[playerid], -1);
   TextDrawSetOutline(TextdrawSpotNumber8[playerid], 0);
   TextDrawSetProportional(TextdrawSpotNumber8[playerid], 1);
   TextDrawSetShadow(TextdrawSpotNumber8[playerid], 0);
   TextDrawSetSelectable(TextdrawSpotNumber8[playerid], 0);

   TextdrawSpotNumber9[playerid] = TextDrawCreate(297.000000, 287.000000, "_");
   TextDrawAlignment(TextdrawSpotNumber9[playerid], 2);
   TextDrawBackgroundColor(TextdrawSpotNumber9[playerid], 255);
   TextDrawFont(TextdrawSpotNumber9[playerid], 1);
   TextDrawLetterSize(TextdrawSpotNumber9[playerid], 0.490000, 2.199999);
   TextDrawColor(TextdrawSpotNumber9[playerid], -1);
   TextDrawSetOutline(TextdrawSpotNumber9[playerid], 0);
   TextDrawSetProportional(TextdrawSpotNumber9[playerid], 1);
   TextDrawSetShadow(TextdrawSpotNumber9[playerid], 0);
   TextDrawSetSelectable(TextdrawSpotNumber9[playerid], 0);

   TextdrawSpotNumber10[playerid] = TextDrawCreate(338.000000, 287.000000, "_");
   TextDrawAlignment(TextdrawSpotNumber10[playerid], 2);
   TextDrawBackgroundColor(TextdrawSpotNumber10[playerid], 255);
   TextDrawFont(TextdrawSpotNumber10[playerid], 1);
   TextDrawLetterSize(TextdrawSpotNumber10[playerid], 0.490000, 2.199999);
   TextDrawColor(TextdrawSpotNumber10[playerid], -1);
   TextDrawSetOutline(TextdrawSpotNumber10[playerid], 0);
   TextDrawSetProportional(TextdrawSpotNumber10[playerid], 1);
   TextDrawSetShadow(TextdrawSpotNumber10[playerid], 0);
   TextDrawSetSelectable(TextdrawSpotNumber10[playerid], 0);

   TextdrawSpotNumber11[playerid] = TextDrawCreate(380.000000, 287.000000, "_");
   TextDrawAlignment(TextdrawSpotNumber11[playerid], 2);
   TextDrawBackgroundColor(TextdrawSpotNumber11[playerid], 255);
   TextDrawFont(TextdrawSpotNumber11[playerid], 1);
   TextDrawLetterSize(TextdrawSpotNumber11[playerid], 0.490000, 2.199999);
   TextDrawColor(TextdrawSpotNumber11[playerid], -1);
   TextDrawSetOutline(TextdrawSpotNumber11[playerid], 0);
   TextDrawSetProportional(TextdrawSpotNumber11[playerid], 1);
   TextDrawSetShadow(TextdrawSpotNumber11[playerid], 0);
   TextDrawSetSelectable(TextdrawSpotNumber11[playerid], 0);

   TextdrawSpotNumber12[playerid] = TextDrawCreate(254.000000, 317.000000, "_");
   TextDrawAlignment(TextdrawSpotNumber12[playerid], 2);
   TextDrawBackgroundColor(TextdrawSpotNumber12[playerid], 255);
   TextDrawFont(TextdrawSpotNumber12[playerid], 1);
   TextDrawLetterSize(TextdrawSpotNumber12[playerid], 0.490000, 2.199999);
   TextDrawColor(TextdrawSpotNumber12[playerid], -1);
   TextDrawSetOutline(TextdrawSpotNumber12[playerid], 0);
   TextDrawSetProportional(TextdrawSpotNumber12[playerid], 1);
   TextDrawSetShadow(TextdrawSpotNumber12[playerid], 0);
   TextDrawSetSelectable(TextdrawSpotNumber12[playerid], 0);

   TextdrawSpotNumber13[playerid] = TextDrawCreate(296.000000, 317.000000, "_");
   TextDrawAlignment(TextdrawSpotNumber13[playerid], 2);
   TextDrawBackgroundColor(TextdrawSpotNumber13[playerid], 255);
   TextDrawFont(TextdrawSpotNumber13[playerid], 1);
   TextDrawLetterSize(TextdrawSpotNumber13[playerid], 0.490000, 2.199999);
   TextDrawColor(TextdrawSpotNumber13[playerid], -1);
   TextDrawSetOutline(TextdrawSpotNumber13[playerid], 0);
   TextDrawSetProportional(TextdrawSpotNumber13[playerid], 1);
   TextDrawSetShadow(TextdrawSpotNumber13[playerid], 0);
   TextDrawSetSelectable(TextdrawSpotNumber13[playerid], 0);

   TextdrawSpotNumber14[playerid] = TextDrawCreate(339.000000, 317.000000, "_");
   TextDrawAlignment(TextdrawSpotNumber14[playerid], 2);
   TextDrawBackgroundColor(TextdrawSpotNumber14[playerid], 255);
   TextDrawFont(TextdrawSpotNumber14[playerid], 1);
   TextDrawLetterSize(TextdrawSpotNumber14[playerid], 0.490000, 2.199999);
   TextDrawColor(TextdrawSpotNumber14[playerid], -1);
   TextDrawSetOutline(TextdrawSpotNumber14[playerid], 0);
   TextDrawSetProportional(TextdrawSpotNumber14[playerid], 1);
   TextDrawSetShadow(TextdrawSpotNumber14[playerid], 0);
   TextDrawSetSelectable(TextdrawSpotNumber14[playerid], 0);

   TextdrawSpotNumber15[playerid] = TextDrawCreate(380.000000, 317.000000, "_");
   TextDrawAlignment(TextdrawSpotNumber15[playerid], 2);
   TextDrawBackgroundColor(TextdrawSpotNumber15[playerid], 255);
   TextDrawFont(TextdrawSpotNumber15[playerid], 1);
   TextDrawLetterSize(TextdrawSpotNumber15[playerid], 0.490000, 2.199999);
   TextDrawColor(TextdrawSpotNumber15[playerid], -1);
   TextDrawSetOutline(TextdrawSpotNumber15[playerid], 0);
   TextDrawSetProportional(TextdrawSpotNumber15[playerid], 1);
   TextDrawSetShadow(TextdrawSpotNumber15[playerid], 0);
   TextDrawSetSelectable(TextdrawSpotNumber15[playerid], 0);
   return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
      TextDrawDestroy(Textdraw2048Spot0[playerid]);
   TextDrawDestroy(Textdraw2048Spot1[playerid]);
   TextDrawDestroy(Textdraw2048Spot2[playerid]);
   TextDrawDestroy(Textdraw2048Spot3[playerid]);
   TextDrawDestroy(Textdraw2048Spot4[playerid]);
   TextDrawDestroy(Textdraw2048Spot5[playerid]);
   TextDrawDestroy(Textdraw2048Spot6[playerid]);
   TextDrawDestroy(Textdraw2048Spot7[playerid]);
   TextDrawDestroy(Textdraw2048Spot8[playerid]);
   TextDrawDestroy(Textdraw2048Spot9[playerid]);
   TextDrawDestroy(Textdraw2048Spot10[playerid]);
   TextDrawDestroy(Textdraw2048Spot11[playerid]);
   TextDrawDestroy(Textdraw2048Spot12[playerid]);
   TextDrawDestroy(Textdraw2048Spot13[playerid]);
   TextDrawDestroy(Textdraw2048Spot14[playerid]);
   TextDrawDestroy(Textdraw2048Spot15[playerid]);
   TextDrawDestroy(Textdraw2048PlayerScore[playerid]);
   TextDrawDestroy(Textdraw2048PlayerBest[playerid]);
   
   TextDrawDestroy(TextdrawSpotNumber0[playerid]);
   TextDrawDestroy(TextdrawSpotNumber1[playerid]);
   TextDrawDestroy(TextdrawSpotNumber2[playerid]);
   TextDrawDestroy(TextdrawSpotNumber3[playerid]);
   TextDrawDestroy(TextdrawSpotNumber4[playerid]);
   TextDrawDestroy(TextdrawSpotNumber5[playerid]);
   TextDrawDestroy(TextdrawSpotNumber6[playerid]);
   TextDrawDestroy(TextdrawSpotNumber7[playerid]);
   TextDrawDestroy(TextdrawSpotNumber8[playerid]);
   TextDrawDestroy(TextdrawSpotNumber9[playerid]);
   TextDrawDestroy(TextdrawSpotNumber10[playerid]);
   TextDrawDestroy(TextdrawSpotNumber11[playerid]);
   TextDrawDestroy(TextdrawSpotNumber12[playerid]);
   TextDrawDestroy(TextdrawSpotNumber13[playerid]);
   TextDrawDestroy(TextdrawSpotNumber14[playerid]);
   TextDrawDestroy(TextdrawSpotNumber15[playerid]);
   return 1;
}

public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
    if(clickedid == Textdraw2048Up)
    {
       new s[8];
      if((Spot[playerid][15] == Spot[playerid][11] && Spot[playerid][15] != 0) || (Spot[playerid][11] == 0 && Spot[playerid][15] != 0)) //15'den 11'e
      {
          Spot[playerid][11] += Spot[playerid][15];
          Spot[playerid][15] = 0;
          PlayerScore[playerid] += Spot[playerid][11];
           format(s,8,"%d",Spot[playerid][11]);
         TextDrawSetString(TextdrawSpotNumber11[playerid], s);
         TextDrawSetString(TextdrawSpotNumber15[playerid], "_");
      }
      if((Spot[playerid][11] == Spot[playerid][7] && Spot[playerid][11] != 0) || (Spot[playerid][7] == 0 && Spot[playerid][11] != 0)) //11'den 7'ye
      {
          Spot[playerid][7] += Spot[playerid][11];
          Spot[playerid][11] = 0;
          PlayerScore[playerid] += Spot[playerid][7];
           format(s,8,"%d",Spot[playerid][7]);
         TextDrawSetString(TextdrawSpotNumber7[playerid], s);
         TextDrawSetString(TextdrawSpotNumber11[playerid], "_");
      }
      if((Spot[playerid][7] == Spot[playerid][3] && Spot[playerid][7] != 0) || (Spot[playerid][3] == 0 && Spot[playerid][7] != 0)) //7'den 3'e
      {
          Spot[playerid][3] += Spot[playerid][7];
          Spot[playerid][7] = 0;
          PlayerScore[playerid] += Spot[playerid][3];
           format(s,8,"%d",Spot[playerid][3]);
         TextDrawSetString(TextdrawSpotNumber3[playerid], s);
         TextDrawSetString(TextdrawSpotNumber7[playerid], "_");
      }

      if((Spot[playerid][14] == Spot[playerid][10] && Spot[playerid][14] != 0) || (Spot[playerid][10] == 0 && Spot[playerid][14] != 0)) //14'den 10'a
      {
          Spot[playerid][10] += Spot[playerid][14];
          Spot[playerid][14] = 0;
          PlayerScore[playerid] += Spot[playerid][10];
           format(s,8,"%d",Spot[playerid][10]);
         TextDrawSetString(TextdrawSpotNumber10[playerid], s);
         TextDrawSetString(TextdrawSpotNumber14[playerid], "_");
      }
      if((Spot[playerid][10] == Spot[playerid][6] && Spot[playerid][10] != 0) || (Spot[playerid][6] == 0 && Spot[playerid][10] != 0)) //10'dan 6'ya
      {
          Spot[playerid][6] += Spot[playerid][10];
          Spot[playerid][10] = 0;
          PlayerScore[playerid] += Spot[playerid][6];
           format(s,8,"%d",Spot[playerid][6]);
         TextDrawSetString(TextdrawSpotNumber6[playerid], s);
         TextDrawSetString(TextdrawSpotNumber10[playerid], "_");
      }
      if((Spot[playerid][6] == Spot[playerid][2] && Spot[playerid][6] != 0) || (Spot[playerid][2] == 0 && Spot[playerid][6] != 0)) //6'dan 2'ye
      {
          Spot[playerid][2] += Spot[playerid][6];
          Spot[playerid][6] = 0;
          PlayerScore[playerid] += Spot[playerid][2];
           format(s,8,"%d",Spot[playerid][2]);
         TextDrawSetString(TextdrawSpotNumber2[playerid], s);
         TextDrawSetString(TextdrawSpotNumber6[playerid], "_");
      }

      if((Spot[playerid][13] == Spot[playerid][9] && Spot[playerid][13] != 0) || (Spot[playerid][9] == 0 && Spot[playerid][13] != 0)) //13'den 9'a
      {
          Spot[playerid][9] += Spot[playerid][13];
          Spot[playerid][13] = 0;
          PlayerScore[playerid] += Spot[playerid][9];
           format(s,8,"%d",Spot[playerid][9]);
         TextDrawSetString(TextdrawSpotNumber9[playerid], s);
         TextDrawSetString(TextdrawSpotNumber13[playerid], "_");
      }
      if((Spot[playerid][9] == Spot[playerid][5] && Spot[playerid][9] != 0) || (Spot[playerid][5] == 0 && Spot[playerid][9] != 0)) //09'dan 05'e
      {
          Spot[playerid][5] += Spot[playerid][9];
          Spot[playerid][9] = 0;
          PlayerScore[playerid] += Spot[playerid][5];
           format(s,8,"%d",Spot[playerid][5]);
         TextDrawSetString(TextdrawSpotNumber5[playerid], s);
         TextDrawSetString(TextdrawSpotNumber9[playerid], "_");
      }
      if((Spot[playerid][5] == Spot[playerid][1] && Spot[playerid][5] != 0) || (Spot[playerid][1] == 0 && Spot[playerid][5] != 0)) //05'den 01'e
      {
          Spot[playerid][1] += Spot[playerid][5];
          Spot[playerid][5] = 0;
          PlayerScore[playerid] += Spot[playerid][1];
           format(s,8,"%d",Spot[playerid][1]);
         TextDrawSetString(TextdrawSpotNumber1[playerid], s);
         TextDrawSetString(TextdrawSpotNumber5[playerid], "_");
      }

      if((Spot[playerid][12] == Spot[playerid][8] && Spot[playerid][12] != 0) || (Spot[playerid][8] == 0 && Spot[playerid][12] != 0)) //12'den 8'e
      {
          Spot[playerid][8] += Spot[playerid][12];
          Spot[playerid][12] = 0;
          PlayerScore[playerid] += Spot[playerid][8];
           format(s,8,"%d",Spot[playerid][8]);
         TextDrawSetString(TextdrawSpotNumber8[playerid], s);
         TextDrawSetString(TextdrawSpotNumber12[playerid], "_");
      }
      if((Spot[playerid][8] == Spot[playerid][4] && Spot[playerid][8] != 0) || (Spot[playerid][4] == 0 && Spot[playerid][8] != 0)) //8'den 4'e
      {
          Spot[playerid][4] += Spot[playerid][8];
          Spot[playerid][8] = 0;
          PlayerScore[playerid] += Spot[playerid][4];
           format(s,8,"%d",Spot[playerid][4]);
         TextDrawSetString(TextdrawSpotNumber4[playerid], s);
         TextDrawSetString(TextdrawSpotNumber8[playerid], "_");
      }
      if((Spot[playerid][4] == Spot[playerid][0] && Spot[playerid][4] != 0) || (Spot[playerid][0] == 0 && Spot[playerid][4] != 0)) //4'den 0'a
      {
          Spot[playerid][0] += Spot[playerid][4];
          Spot[playerid][4] = 0;
          PlayerScore[playerid] += Spot[playerid][0];
           format(s,8,"%d",Spot[playerid][0]);
         TextDrawSetString(TextdrawSpotNumber0[playerid], s);
         TextDrawSetString(TextdrawSpotNumber4[playerid], "_");
      }
      format(s,8,"%d",PlayerScore[playerid]);
      TextDrawSetString(Textdraw2048PlayerScore[playerid],s);
      AddNumber(playerid);
    }
    if(clickedid == Textdraw2048Down)
    {
        new s[8];
      if((Spot[playerid][3] == Spot[playerid][7] && Spot[playerid][3] != 0) || (Spot[playerid][7] == 0 && Spot[playerid][3] != 0)) //3'den 7'ye
      {
          Spot[playerid][7] += Spot[playerid][3];
          Spot[playerid][3] = 0;
          PlayerScore[playerid] += Spot[playerid][7];
           format(s,8,"%d",Spot[playerid][7]);
         TextDrawSetString(TextdrawSpotNumber7[playerid], s);
         TextDrawSetString(TextdrawSpotNumber3[playerid], "_");
      }
      if((Spot[playerid][7] == Spot[playerid][11] && Spot[playerid][7] != 0) || (Spot[playerid][11] == 0 && Spot[playerid][7] != 0)) //7'den 11'a
      {
          Spot[playerid][11] += Spot[playerid][7];
          Spot[playerid][7] = 0;
          PlayerScore[playerid] += Spot[playerid][11];
           format(s,8,"%d",Spot[playerid][11]);
         TextDrawSetString(TextdrawSpotNumber11[playerid], s);
         TextDrawSetString(TextdrawSpotNumber7[playerid], "_");
      }
      if((Spot[playerid][11] == Spot[playerid][15] && Spot[playerid][11] != 0) || (Spot[playerid][15] == 0 && Spot[playerid][11] != 0)) //11'den 15'e
      {
          Spot[playerid][15] += Spot[playerid][11];
          Spot[playerid][11] = 0;
          PlayerScore[playerid] += Spot[playerid][15];
           format(s,8,"%d",Spot[playerid][15]);
         TextDrawSetString(TextdrawSpotNumber15[playerid], s);
         TextDrawSetString(TextdrawSpotNumber11[playerid], "_");
      }

        if((Spot[playerid][2] == Spot[playerid][6] && Spot[playerid][2] != 0) || (Spot[playerid][6] == 0 && Spot[playerid][2] != 0)) //2'den 6'ya
      {
          Spot[playerid][6] += Spot[playerid][2];
          Spot[playerid][2] = 0;
          PlayerScore[playerid] += Spot[playerid][6];
           format(s,8,"%d",Spot[playerid][6]);
         TextDrawSetString(TextdrawSpotNumber6[playerid], s);
         TextDrawSetString(TextdrawSpotNumber2[playerid], "_");
      }
      if((Spot[playerid][6] == Spot[playerid][10] && Spot[playerid][6] != 0) || (Spot[playerid][10] == 0 && Spot[playerid][6] != 0)) //6'dan 10'a
      {
          Spot[playerid][10] += Spot[playerid][6];
          Spot[playerid][6] = 0;
          PlayerScore[playerid] += Spot[playerid][10];
           format(s,8,"%d",Spot[playerid][10]);
         TextDrawSetString(TextdrawSpotNumber10[playerid], s);
         TextDrawSetString(TextdrawSpotNumber6[playerid], "_");
      }
      if((Spot[playerid][10] == Spot[playerid][14] && Spot[playerid][10] != 0) || (Spot[playerid][14] == 0 && Spot[playerid][10] != 0)) //10'dan 14'e
      {
          Spot[playerid][14] += Spot[playerid][10];
          Spot[playerid][10] = 0;
          PlayerScore[playerid] += Spot[playerid][14];
           format(s,8,"%d",Spot[playerid][14]);
         TextDrawSetString(TextdrawSpotNumber14[playerid], s);
         TextDrawSetString(TextdrawSpotNumber10[playerid], "_");
      }

      if((Spot[playerid][1] == Spot[playerid][5] && Spot[playerid][1] != 0) || (Spot[playerid][5] == 0 && Spot[playerid][1] != 0)) //01'den 05'e
      {
          Spot[playerid][5] += Spot[playerid][1];
          Spot[playerid][1] = 0;
          PlayerScore[playerid] += Spot[playerid][5];
           format(s,8,"%d",Spot[playerid][5]);
         TextDrawSetString(TextdrawSpotNumber5[playerid], s);
         TextDrawSetString(TextdrawSpotNumber1[playerid], "_");
      }
      if((Spot[playerid][5] == Spot[playerid][9] && Spot[playerid][5] != 0) || (Spot[playerid][9] == 0 && Spot[playerid][5] != 0)) //05'den 09'a
      {
          Spot[playerid][9] += Spot[playerid][5];
          Spot[playerid][5] = 0;
          PlayerScore[playerid] += Spot[playerid][9];
           format(s,8,"%d",Spot[playerid][9]);
         TextDrawSetString(TextdrawSpotNumber9[playerid], s);
         TextDrawSetString(TextdrawSpotNumber5[playerid], "_");
      }
      if((Spot[playerid][9] == Spot[playerid][13] && Spot[playerid][9] != 0) || (Spot[playerid][13] == 0 && Spot[playerid][9] != 0)) //9'dan 13'e
      {
          Spot[playerid][13] += Spot[playerid][9];
          Spot[playerid][9] = 0;
          PlayerScore[playerid] += Spot[playerid][13];
           format(s,8,"%d",Spot[playerid][13]);
         TextDrawSetString(TextdrawSpotNumber13[playerid], s);
         TextDrawSetString(TextdrawSpotNumber9[playerid], "_");
      }

      if((Spot[playerid][0] == Spot[playerid][4] && Spot[playerid][0] != 0) || (Spot[playerid][4] == 0 && Spot[playerid][0] != 0)) //0'dan 4'e
      {
          Spot[playerid][4] += Spot[playerid][0];
          Spot[playerid][0] = 0;
          PlayerScore[playerid] += Spot[playerid][4];
           format(s,8,"%d",Spot[playerid][4]);
         TextDrawSetString(TextdrawSpotNumber4[playerid], s);
         TextDrawSetString(TextdrawSpotNumber0[playerid], "_");
      }
      if((Spot[playerid][4] == Spot[playerid][8] && Spot[playerid][4] != 0) || (Spot[playerid][8] == 0 && Spot[playerid][4] != 0)) //4'den 8'e
      {
          Spot[playerid][8] += Spot[playerid][4];
          Spot[playerid][4] = 0;
          PlayerScore[playerid] += Spot[playerid][8];
           format(s,8,"%d",Spot[playerid][8]);
         TextDrawSetString(TextdrawSpotNumber8[playerid], s);
         TextDrawSetString(TextdrawSpotNumber4[playerid], "_");
      }

      if((Spot[playerid][8] == Spot[playerid][12] && Spot[playerid][8] != 0) || (Spot[playerid][12] == 0 && Spot[playerid][8] != 0)) //8'den 12'ye
      {
          Spot[playerid][12] += Spot[playerid][8];
          Spot[playerid][8] = 0;
          PlayerScore[playerid] += Spot[playerid][12];
           format(s,8,"%d",Spot[playerid][12]);
         TextDrawSetString(TextdrawSpotNumber12[playerid], s);
         TextDrawSetString(TextdrawSpotNumber8[playerid], "_");
      }
      format(s,8,"%d",PlayerScore[playerid]);
      TextDrawSetString(Textdraw2048PlayerScore[playerid],s);
      AddNumber(playerid);
    }
    if(clickedid == Textdraw2048Left)
    {
        new s[8];
      if((Spot[playerid][3] == Spot[playerid][2] && Spot[playerid][3] != 0) || (Spot[playerid][2] == 0 && Spot[playerid][3] != 0)) //03'den 02'ye
      {
          Spot[playerid][2] += Spot[playerid][3];
          Spot[playerid][3] = 0;
          PlayerScore[playerid] += Spot[playerid][2];
           format(s,8,"%d",Spot[playerid][2]);
         TextDrawSetString(TextdrawSpotNumber2[playerid], s);
         TextDrawSetString(TextdrawSpotNumber3[playerid], "_");
      }
      if((Spot[playerid][2] == Spot[playerid][1] && Spot[playerid][2] != 0) || (Spot[playerid][1] == 0 && Spot[playerid][2] != 0)) //02'den 01'e
      {
          Spot[playerid][1] += Spot[playerid][2];
          Spot[playerid][2] = 0;
          PlayerScore[playerid] += Spot[playerid][1];
           format(s,8,"%d",Spot[playerid][1]);
         TextDrawSetString(TextdrawSpotNumber1[playerid], s);
         TextDrawSetString(TextdrawSpotNumber2[playerid], "_");
      }
      if((Spot[playerid][1] == Spot[playerid][0] && Spot[playerid][1] != 0) || (Spot[playerid][0] == 0 && Spot[playerid][1] != 0)) //01'den 00'a
      {
          Spot[playerid][0] += Spot[playerid][1];
          Spot[playerid][1] = 0;
          PlayerScore[playerid] += Spot[playerid][0];
           format(s,8,"%d",Spot[playerid][0]);
         TextDrawSetString(TextdrawSpotNumber0[playerid], s);
         TextDrawSetString(TextdrawSpotNumber1[playerid], "_");
      }

      if((Spot[playerid][7] == Spot[playerid][6] && Spot[playerid][7] != 0) || (Spot[playerid][6] == 0 && Spot[playerid][7] != 0)) //07'den 02'ye
      {
          Spot[playerid][6] += Spot[playerid][7];
          Spot[playerid][7] = 0;
          PlayerScore[playerid] += Spot[playerid][6];
           format(s,8,"%d",Spot[playerid][6]);
         TextDrawSetString(TextdrawSpotNumber6[playerid], s);
         TextDrawSetString(TextdrawSpotNumber7[playerid], "_");
      }
      if((Spot[playerid][6] == Spot[playerid][5] && Spot[playerid][6] != 0) || (Spot[playerid][5] == 0 && Spot[playerid][6] != 0)) //06'dan 05'e
      {
          Spot[playerid][5] += Spot[playerid][6];
          Spot[playerid][6] = 0;
          PlayerScore[playerid] += Spot[playerid][5];
           format(s,8,"%d",Spot[playerid][5]);
         TextDrawSetString(TextdrawSpotNumber5[playerid], s);
         TextDrawSetString(TextdrawSpotNumber6[playerid], "_");
      }
      if((Spot[playerid][5] == Spot[playerid][4] && Spot[playerid][5] != 0) || (Spot[playerid][4] == 0 && Spot[playerid][5] != 0)) //05'den 04'e
      {
          Spot[playerid][4] += Spot[playerid][5];
          Spot[playerid][5] = 0;
          PlayerScore[playerid] += Spot[playerid][4];
           format(s,8,"%d",Spot[playerid][4]);
         TextDrawSetString(TextdrawSpotNumber4[playerid], s);
         TextDrawSetString(TextdrawSpotNumber5[playerid], "_");
      }

      if((Spot[playerid][11] == Spot[playerid][10] && Spot[playerid][11] != 0) || (Spot[playerid][10] == 0 && Spot[playerid][11] != 0)) //11'den 10'a
      {
          Spot[playerid][10] += Spot[playerid][11];
          Spot[playerid][11] = 0;
          PlayerScore[playerid] += Spot[playerid][10];
           format(s,8,"%d",Spot[playerid][10]);
         TextDrawSetString(TextdrawSpotNumber10[playerid], s);
         TextDrawSetString(TextdrawSpotNumber11[playerid], "_");
      }
      if((Spot[playerid][10] == Spot[playerid][9] && Spot[playerid][10] != 0) || (Spot[playerid][9] == 0 && Spot[playerid][10] != 0)) //10'dan 9'a
      {
          Spot[playerid][9] += Spot[playerid][10];
          Spot[playerid][10] = 0;
          PlayerScore[playerid] += Spot[playerid][9];
           format(s,8,"%d",Spot[playerid][9]);
         TextDrawSetString(TextdrawSpotNumber9[playerid], s);
         TextDrawSetString(TextdrawSpotNumber10[playerid], "_");
      }
      if((Spot[playerid][9] == Spot[playerid][8] && Spot[playerid][9] != 0) || (Spot[playerid][8] == 0 && Spot[playerid][9] != 0)) //9'dan 8'e
      {
          Spot[playerid][8] += Spot[playerid][9];
          Spot[playerid][9] = 0;
          PlayerScore[playerid] += Spot[playerid][8];
           format(s,8,"%d",Spot[playerid][8]);
         TextDrawSetString(TextdrawSpotNumber8[playerid], s);
         TextDrawSetString(TextdrawSpotNumber9[playerid], "_");
      }

      if((Spot[playerid][15] == Spot[playerid][14] && Spot[playerid][15] != 0) || (Spot[playerid][14] == 0 && Spot[playerid][15] != 0)) //15'den 14'e
      {
          Spot[playerid][14] += Spot[playerid][15];
          Spot[playerid][15] = 0;
          PlayerScore[playerid] += Spot[playerid][14];
           format(s,8,"%d",Spot[playerid][14]);
         TextDrawSetString(TextdrawSpotNumber14[playerid], s);
         TextDrawSetString(TextdrawSpotNumber15[playerid], "_");
      }
      if((Spot[playerid][14] == Spot[playerid][13] && Spot[playerid][14] != 0) || (Spot[playerid][13] == 0 && Spot[playerid][14] != 0)) //14'den 13'e
      {
          Spot[playerid][13] += Spot[playerid][14];
          Spot[playerid][14] = 0;
          PlayerScore[playerid] += Spot[playerid][13];
           format(s,8,"%d",Spot[playerid][13]);
         TextDrawSetString(TextdrawSpotNumber13[playerid], s);
         TextDrawSetString(TextdrawSpotNumber14[playerid], "_");
      }
      if((Spot[playerid][13] == Spot[playerid][12] && Spot[playerid][13] != 0) || (Spot[playerid][12] == 0 && Spot[playerid][13] != 0)) //13'den 12'ye
      {
          Spot[playerid][12] += Spot[playerid][13];
          Spot[playerid][13] = 0;
          PlayerScore[playerid] += Spot[playerid][12];
           format(s,8,"%d",Spot[playerid][12]);
         TextDrawSetString(TextdrawSpotNumber12[playerid], s);
         TextDrawSetString(TextdrawSpotNumber13[playerid], "_");
      }
      format(s,8,"%d",PlayerScore[playerid]);
      TextDrawSetString(Textdraw2048PlayerScore[playerid],s);
      AddNumber(playerid);
    }
    if(clickedid == Textdraw2048Right)
    {
        new s[8];
      if((Spot[playerid][0] == Spot[playerid][1] && Spot[playerid][0] != 0) || (Spot[playerid][1] == 0 && Spot[playerid][0] != 0)) //00'dan 01'e
      {
          Spot[playerid][1] += Spot[playerid][0];
          Spot[playerid][0] = 0;
          PlayerScore[playerid] += Spot[playerid][1];
           format(s,8,"%d",Spot[playerid][1]);
         TextDrawSetString(TextdrawSpotNumber1[playerid], s);
         TextDrawSetString(TextdrawSpotNumber0[playerid], "_");
      }
      if((Spot[playerid][1] == Spot[playerid][2] && Spot[playerid][1] != 0) || (Spot[playerid][2] == 0 && Spot[playerid][1] != 0)) //01'den 02'ye
      {
          Spot[playerid][2] += Spot[playerid][1];
          Spot[playerid][1] = 0;
          PlayerScore[playerid] += Spot[playerid][2];
           format(s,8,"%d",Spot[playerid][2]);
         TextDrawSetString(TextdrawSpotNumber2[playerid], s);
         TextDrawSetString(TextdrawSpotNumber1[playerid], "_");
      }
      if((Spot[playerid][2] == Spot[playerid][3] && Spot[playerid][2] != 0) || (Spot[playerid][3] == 0 && Spot[playerid][2] != 0)) //02'den 03'e
      {
          Spot[playerid][3] += Spot[playerid][2];
          Spot[playerid][2] = 0;
          PlayerScore[playerid] += Spot[playerid][3];
           format(s,8,"%d",Spot[playerid][3]);
         TextDrawSetString(TextdrawSpotNumber3[playerid], s);
         TextDrawSetString(TextdrawSpotNumber2[playerid], "_");
      }

      if((Spot[playerid][4] == Spot[playerid][5] && Spot[playerid][4] != 0) || (Spot[playerid][5] == 0 && Spot[playerid][4] != 0)) //04'den 05'e
      {
          Spot[playerid][5] += Spot[playerid][4];
          Spot[playerid][4] = 0;
          PlayerScore[playerid] += Spot[playerid][5];
           format(s,8,"%d",Spot[playerid][5]);
         TextDrawSetString(TextdrawSpotNumber5[playerid], s);
         TextDrawSetString(TextdrawSpotNumber4[playerid], "_");
      }
      if((Spot[playerid][5] == Spot[playerid][6] && Spot[playerid][5] != 0) || (Spot[playerid][6] == 0 && Spot[playerid][5] != 0)) //05'den 06'ya
      {
          Spot[playerid][6] += Spot[playerid][5];
          Spot[playerid][5] = 0;
          PlayerScore[playerid] += Spot[playerid][6];
           format(s,8,"%d",Spot[playerid][6]);
         TextDrawSetString(TextdrawSpotNumber6[playerid], s);
         TextDrawSetString(TextdrawSpotNumber5[playerid], "_");
      }
      if((Spot[playerid][6] == Spot[playerid][7] && Spot[playerid][6] != 0) || (Spot[playerid][7] == 0 && Spot[playerid][6] != 0)) //06'dan 07'ye
      {
          Spot[playerid][7] += Spot[playerid][6];
          Spot[playerid][6] = 0;
          PlayerScore[playerid] += Spot[playerid][7];
           format(s,8,"%d",Spot[playerid][7]);
         TextDrawSetString(TextdrawSpotNumber7[playerid], s);
         TextDrawSetString(TextdrawSpotNumber6[playerid], "_");
      }

       if((Spot[playerid][8] == Spot[playerid][9] && Spot[playerid][8] != 0) || (Spot[playerid][9] == 0 && Spot[playerid][8] != 0)) //08'den 09'a
      {
          Spot[playerid][9] += Spot[playerid][8];
          Spot[playerid][8] = 0;
          PlayerScore[playerid] += Spot[playerid][9];
           format(s,8,"%d",Spot[playerid][9]);
         TextDrawSetString(TextdrawSpotNumber9[playerid], s);
         TextDrawSetString(TextdrawSpotNumber8[playerid], "_");
      }
      if((Spot[playerid][9] == Spot[playerid][10] && Spot[playerid][9] != 0) || (Spot[playerid][10] == 0 && Spot[playerid][9] != 0)) //09'dan 10'a
      {
          Spot[playerid][10] += Spot[playerid][9];
          Spot[playerid][9] = 0;
          PlayerScore[playerid] += Spot[playerid][10];
           format(s,8,"%d",Spot[playerid][10]);
         TextDrawSetString(TextdrawSpotNumber10[playerid], s);
         TextDrawSetString(TextdrawSpotNumber9[playerid], "_");
      }
      if((Spot[playerid][10] == Spot[playerid][11] && Spot[playerid][10] != 0) || (Spot[playerid][11] == 0 && Spot[playerid][10] != 0)) //10'dan 11'e
      {
          Spot[playerid][11] += Spot[playerid][10];
          Spot[playerid][10] = 0;
          PlayerScore[playerid] += Spot[playerid][11];
           format(s,8,"%d",Spot[playerid][11]);
         TextDrawSetString(TextdrawSpotNumber11[playerid], s);
         TextDrawSetString(TextdrawSpotNumber10[playerid], "_");
      }

      if((Spot[playerid][12] == Spot[playerid][13] && Spot[playerid][12] != 0) || (Spot[playerid][13] == 0 && Spot[playerid][12] != 0)) //12'den 13'e
      {
          Spot[playerid][13] += Spot[playerid][12];
          Spot[playerid][12] = 0;
          PlayerScore[playerid] += Spot[playerid][13];
           format(s,8,"%d",Spot[playerid][13]);
         TextDrawSetString(TextdrawSpotNumber13[playerid], s);
         TextDrawSetString(TextdrawSpotNumber12[playerid], "_");
      }
      if((Spot[playerid][13] == Spot[playerid][14] && Spot[playerid][13] != 0) || (Spot[playerid][14] == 0 && Spot[playerid][13] != 0)) //13'den 14'e
      {
          Spot[playerid][14] += Spot[playerid][13];
          Spot[playerid][13] = 0;
          PlayerScore[playerid] += Spot[playerid][14];
           format(s,8,"%d",Spot[playerid][14]);
         TextDrawSetString(TextdrawSpotNumber14[playerid], s);
         TextDrawSetString(TextdrawSpotNumber13[playerid], "_");
      }
      if((Spot[playerid][14] == Spot[playerid][15] && Spot[playerid][14] != 0) || (Spot[playerid][15] == 0 && Spot[playerid][14] != 0)) //14'den 15'e
      {
          Spot[playerid][15] += Spot[playerid][14];
          Spot[playerid][14] = 0;
          PlayerScore[playerid] += Spot[playerid][15];
           format(s,8,"%d",Spot[playerid][15]);
         TextDrawSetString(TextdrawSpotNumber15[playerid], s);
         TextDrawSetString(TextdrawSpotNumber14[playerid], "_");
      }
      format(s,8,"%d",PlayerScore[playerid]);
      TextDrawSetString(Textdraw2048PlayerScore[playerid],s);
      AddNumber(playerid);
    }
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
   if (strcmp("/2048", cmdtext, true, 10) == 0)
   {
       PlayerScore[playerid] = 0;
       TextDrawSetString(Textdraw2048PlayerScore[playerid], "0");
      TextDrawSetString(TextdrawSpotNumber0[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber1[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber2[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber3[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber4[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber5[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber6[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber7[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber8[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber9[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber10[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber11[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber12[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber13[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber14[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber15[playerid],"_");

       for(new s = 0; s < 16; s++)
      {
          Spot[playerid][s] = 0;
        }
        
       TextDrawShowForPlayer(playerid,Textdraw2048Background1);
      TextDrawShowForPlayer(playerid,Textdraw2048Background2);
      TextDrawShowForPlayer(playerid,Textdraw2048Background3);
      TextDrawShowForPlayer(playerid,Textdraw2048Background4);
      TextDrawShowForPlayer(playerid,Textdraw2048Background5);
      TextDrawShowForPlayer(playerid,Textdraw2048Background6);
        TextDrawShowForPlayer(playerid,Textdraw2048Spot0[playerid]);
        TextDrawShowForPlayer(playerid,Textdraw2048Spot1[playerid]);
      TextDrawShowForPlayer(playerid,Textdraw2048Spot2[playerid]);
      TextDrawShowForPlayer(playerid,Textdraw2048Spot3[playerid]);
      TextDrawShowForPlayer(playerid,Textdraw2048Spot4[playerid]);
      TextDrawShowForPlayer(playerid,Textdraw2048Spot5[playerid]);
      TextDrawShowForPlayer(playerid,Textdraw2048Spot6[playerid]);
      TextDrawShowForPlayer(playerid,Textdraw2048Spot7[playerid]);
      TextDrawShowForPlayer(playerid,Textdraw2048Spot8[playerid]);
      TextDrawShowForPlayer(playerid,Textdraw2048Spot9[playerid]);
      TextDrawShowForPlayer(playerid,Textdraw2048Spot10[playerid]);
      TextDrawShowForPlayer(playerid,Textdraw2048Spot11[playerid]);
      TextDrawShowForPlayer(playerid,Textdraw2048Spot12[playerid]);
      TextDrawShowForPlayer(playerid,Textdraw2048Spot13[playerid]);
      TextDrawShowForPlayer(playerid,Textdraw2048Spot14[playerid]);
      TextDrawShowForPlayer(playerid,Textdraw2048Spot15[playerid]);
      TextDrawShowForPlayer(playerid,Textdraw2048Up);
      TextDrawShowForPlayer(playerid,Textdraw2048Down);
      TextDrawShowForPlayer(playerid,Textdraw2048Left);
      TextDrawShowForPlayer(playerid,Textdraw2048Right);
      TextDrawShowForPlayer(playerid,Textdraw2048Score);
      TextDrawShowForPlayer(playerid,Textdraw2048PlayerScore[playerid]);
      TextDrawShowForPlayer(playerid,Textdraw2048Best);
      TextDrawShowForPlayer(playerid,Textdraw2048PlayerBest[playerid]);
      TextDrawShowForPlayer(playerid,TextdrawSpotNumber0[playerid]);
      TextDrawShowForPlayer(playerid,TextdrawSpotNumber1[playerid]);
      TextDrawShowForPlayer(playerid,TextdrawSpotNumber2[playerid]);
      TextDrawShowForPlayer(playerid,TextdrawSpotNumber3[playerid]);
      TextDrawShowForPlayer(playerid,TextdrawSpotNumber4[playerid]);
      TextDrawShowForPlayer(playerid,TextdrawSpotNumber5[playerid]);
      TextDrawShowForPlayer(playerid,TextdrawSpotNumber6[playerid]);
      TextDrawShowForPlayer(playerid,TextdrawSpotNumber7[playerid]);
      TextDrawShowForPlayer(playerid,TextdrawSpotNumber8[playerid]);
      TextDrawShowForPlayer(playerid,TextdrawSpotNumber9[playerid]);
      TextDrawShowForPlayer(playerid,TextdrawSpotNumber10[playerid]);
      TextDrawShowForPlayer(playerid,TextdrawSpotNumber11[playerid]);
      TextDrawShowForPlayer(playerid,TextdrawSpotNumber12[playerid]);
      TextDrawShowForPlayer(playerid,TextdrawSpotNumber13[playerid]);
      TextDrawShowForPlayer(playerid,TextdrawSpotNumber14[playerid]);
      TextDrawShowForPlayer(playerid,TextdrawSpotNumber15[playerid]);
      AddNumber(playerid);
      SelectTextDraw(playerid, 0xFF4040AA);
       return 1;
    }
    return 0;
}

public OnPlayerSpawn(playerid)
{
   return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
   return 1;
}

stock IsNumberOK(number)
{
   if(number == 2 || number == 4) return true;
   else return false;
}

stock GenerateRandomSpotID(playerid)
{
   new num = 0;
   check:
   num = random(16);
   if(Spot[playerid][num] != 0)
   {
      goto check;
   }
   return num;
}

stock AddNumber(playerid)
{
    new count = 0;
   for(new i = 0; i < 16; i++)
    {
      if(Spot[playerid][i] == 0) { count++; }
    }
    if(count != 0)
     {
         new id = GenerateRandomSpotID(playerid);
         check:
         Spot[playerid][id] = random(16);
         if(IsNumberOK(Spot[playerid][id]))
         {
             new t[8]; format(t,8,"%d",Spot[playerid][id]);
         if(id == 0) { TextDrawSetString(TextdrawSpotNumber0[playerid], t); }
         else if(id == 1) { TextDrawSetString(TextdrawSpotNumber1[playerid], t); }
         else if(id == 2) { TextDrawSetString(TextdrawSpotNumber2[playerid], t); }
         else if(id == 3) { TextDrawSetString(TextdrawSpotNumber3[playerid], t); }
         else if(id == 4) { TextDrawSetString(TextdrawSpotNumber4[playerid], t); }
         else if(id == 5) { TextDrawSetString(TextdrawSpotNumber5[playerid], t); }
         else if(id == 6) { TextDrawSetString(TextdrawSpotNumber6[playerid], t); }
         else if(id == 7) { TextDrawSetString(TextdrawSpotNumber7[playerid], t); }
         else if(id == 8) { TextDrawSetString(TextdrawSpotNumber8[playerid], t); }
         else if(id == 9) { TextDrawSetString(TextdrawSpotNumber9[playerid], t); }
         else if(id == 10) { TextDrawSetString(TextdrawSpotNumber10[playerid], t); }
         else if(id == 11) { TextDrawSetString(TextdrawSpotNumber11[playerid], t); }
         else if(id == 12) { TextDrawSetString(TextdrawSpotNumber12[playerid], t); }
         else if(id == 13) { TextDrawSetString(TextdrawSpotNumber13[playerid], t); }
         else if(id == 14) { TextDrawSetString(TextdrawSpotNumber14[playerid], t); }
         else if(id == 15) { TextDrawSetString(TextdrawSpotNumber15[playerid], t); }
         PlayerPlaySound(playerid, 1149, 0, 0, 0);
       }
       else
       {
           goto check;
         }
      }
      else
      {
          TextDrawHideForPlayer(playerid,Textdraw2048Background1);
      TextDrawHideForPlayer(playerid,Textdraw2048Background2);
      TextDrawHideForPlayer(playerid,Textdraw2048Background3);
      TextDrawHideForPlayer(playerid,Textdraw2048Background4);
      TextDrawHideForPlayer(playerid,Textdraw2048Background5);
      TextDrawHideForPlayer(playerid,Textdraw2048Background6);
        TextDrawHideForPlayer(playerid,Textdraw2048Spot0[playerid]);
        TextDrawHideForPlayer(playerid,Textdraw2048Spot1[playerid]);
      TextDrawHideForPlayer(playerid,Textdraw2048Spot2[playerid]);
      TextDrawHideForPlayer(playerid,Textdraw2048Spot3[playerid]);
      TextDrawHideForPlayer(playerid,Textdraw2048Spot4[playerid]);
      TextDrawHideForPlayer(playerid,Textdraw2048Spot5[playerid]);
      TextDrawHideForPlayer(playerid,Textdraw2048Spot6[playerid]);
      TextDrawHideForPlayer(playerid,Textdraw2048Spot7[playerid]);
      TextDrawHideForPlayer(playerid,Textdraw2048Spot8[playerid]);
      TextDrawHideForPlayer(playerid,Textdraw2048Spot9[playerid]);
      TextDrawHideForPlayer(playerid,Textdraw2048Spot10[playerid]);
      TextDrawHideForPlayer(playerid,Textdraw2048Spot11[playerid]);
      TextDrawHideForPlayer(playerid,Textdraw2048Spot12[playerid]);
      TextDrawHideForPlayer(playerid,Textdraw2048Spot13[playerid]);
      TextDrawHideForPlayer(playerid,Textdraw2048Spot14[playerid]);
      TextDrawHideForPlayer(playerid,Textdraw2048Spot15[playerid]);
      TextDrawHideForPlayer(playerid,Textdraw2048Up);
      TextDrawHideForPlayer(playerid,Textdraw2048Down);
      TextDrawHideForPlayer(playerid,Textdraw2048Left);
      TextDrawHideForPlayer(playerid,Textdraw2048Right);
      TextDrawHideForPlayer(playerid,Textdraw2048Score);
      TextDrawHideForPlayer(playerid,Textdraw2048PlayerScore[playerid]);
      TextDrawHideForPlayer(playerid,Textdraw2048Best);
      TextDrawHideForPlayer(playerid,Textdraw2048PlayerBest[playerid]);
      TextDrawHideForPlayer(playerid,TextdrawSpotNumber0[playerid]);
      TextDrawHideForPlayer(playerid,TextdrawSpotNumber1[playerid]);
      TextDrawHideForPlayer(playerid,TextdrawSpotNumber2[playerid]);
      TextDrawHideForPlayer(playerid,TextdrawSpotNumber3[playerid]);
      TextDrawHideForPlayer(playerid,TextdrawSpotNumber4[playerid]);
      TextDrawHideForPlayer(playerid,TextdrawSpotNumber5[playerid]);
      TextDrawHideForPlayer(playerid,TextdrawSpotNumber6[playerid]);
      TextDrawHideForPlayer(playerid,TextdrawSpotNumber7[playerid]);
      TextDrawHideForPlayer(playerid,TextdrawSpotNumber8[playerid]);
      TextDrawHideForPlayer(playerid,TextdrawSpotNumber9[playerid]);
      TextDrawHideForPlayer(playerid,TextdrawSpotNumber10[playerid]);
      TextDrawHideForPlayer(playerid,TextdrawSpotNumber11[playerid]);
      TextDrawHideForPlayer(playerid,TextdrawSpotNumber12[playerid]);
      TextDrawHideForPlayer(playerid,TextdrawSpotNumber13[playerid]);
      TextDrawHideForPlayer(playerid,TextdrawSpotNumber14[playerid]);
      TextDrawHideForPlayer(playerid,TextdrawSpotNumber15[playerid]);

      TextDrawSetString(TextdrawSpotNumber0[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber1[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber2[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber3[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber4[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber5[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber6[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber7[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber8[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber9[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber10[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber11[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber12[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber13[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber14[playerid],"_");
      TextDrawSetString(TextdrawSpotNumber15[playerid],"_");
          PlayerPlaySound(playerid, 1055, 0, 0, 0);
      SendClientMessage(playerid,-1,"GAME OVER");
      CancelSelectTextDraw(playerid);
      }
   return 1;
}
Изображение

! ! !


  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «Скрипты / FS»

Кто сейчас на форуме