Advertisement
Guest User

Christmas Tree by Zh3r0

a guest
Dec 5th, 2010
2,580
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 21.38 KB | None | 0 0
  1. /*
  2.  
  3.     Christmas Tree!
  4.     Created by Zh3r0
  5.     On date: 06.12.2010
  6.     Christmas it's coming, try and show how kind you are, and don't delete the credits for this.
  7.     Try to be a good guy, if you want santa to bring you candies!
  8.  
  9.     [ATENTION]
  10.     If you use the new SA-MP version, 0.3c, please comment the line 24.
  11.     (   #define V03c to become  //#define V03c    )
  12.    
  13.     [CREDITS]
  14.     # RGBA Function - by Zezombia
  15.     # Text-Draw editor - by Zamaroht
  16.     # Took the color idea from RyDeR and his "In-Game Color Picker" filterscript.
  17.  
  18. */
  19.  
  20.  
  21. #include < a_samp  >
  22.  
  23.  
  24. #define V03c
  25.  
  26. #define COL_ORANGE         "{FFAF00}"
  27. #define COL_GREEN          "{6EF83C}"
  28. #define COL_RED            "{FF4040}"
  29. #define COL_BLUE           "{0285FF}"
  30. #define COL_YELLOW         "{FFEA02}"
  31. #define COL_EASY           "{85D5FF}"
  32.  
  33.  
  34. forward  LoadTree(  );
  35.          ChangeColors(  );
  36.          UpdateTree(  );
  37.          DestroyTree(  );
  38.          HideTree(  playerid  );
  39.          ShowTree(  playerid  );
  40.          
  41.  
  42. stock RGBA(R, G, B, A) return ( R * 16777216 ) + ( G * 65536 ) + ( B * 256 ) + A ;
  43.  
  44. new
  45.     Text:ChristmasTree[23],
  46.     RedValue,
  47.     BlueValue,
  48.     GreenValue,
  49.     Phase,
  50.     PhaseTimes,
  51.     bool:pTree[ MAX_PLAYERS ]
  52. ;
  53. public
  54.         OnFilterScriptInit(   )
  55. {
  56.  
  57.     SetTimer(  "ChangeColors" , 300, true   );
  58.     LoadTree(  );
  59.  
  60.     return true;
  61. }
  62.  
  63. public
  64.         OnFilterScriptExit(   )
  65. {
  66.     DestroyTree(  );
  67.  
  68.     return true;
  69. }
  70.  
  71. public
  72.         OnPlayerCommandText( playerid, cmdtext[] )
  73. {
  74.     if ( strcmp ( cmdtext, "/tree", true ) == 0 )
  75.     {
  76.         if ( pTree[ playerid ] == true )
  77.         {
  78.             pTree[ playerid ] = false ;
  79.  
  80.             #if defined V03c
  81.             SendClientMessage( playerid, -1, ""#COL_EASY"You "#COL_RED"killed "#COL_EASY"the Christmas Tree! {FFFFFF}["#COL_RED"NO CHRISTMAS SPIRIT{FFFFFF}]");
  82.             SendClientMessage( playerid, -1, ""#COL_EASY"Write again "#COL_BLUE"/tree"#COL_EASY" to activate it! "#COL_RED"You murderer!");
  83.  
  84.             #else
  85.  
  86.             SendClientMessage( playerid, -1,"You killed the Christmas Tree! [ NO CHRISTMAS SPIRIT]");
  87.             SendClientMessage( playerid, -1, "Write again /tree to activate it! You murderer!");
  88.  
  89.             #endif
  90.  
  91.             HideTree(  playerid  );
  92.         }
  93.         else
  94.         {
  95.             pTree[ playerid ] = true ;
  96.  
  97.             #if defined V03c
  98.             SendClientMessage( playerid, -1, ""#COL_EASY"You "#COL_GREEN"revived"#COL_EASY"   the Christmas Tree! {FFFFFF}["#COL_GREEN"YAY CHRISTMAS PHUN!{FFFFFF}]");
  99.             SendClientMessage( playerid, -1, ""#COL_EASY"Write again "#COL_BLUE"/tree"#COL_EASY" to kill it! "#COL_RED"You murderer!");
  100.  
  101.             #else
  102.  
  103.             SendClientMessage( playerid, -1, "You revivedthe Christmas Tree![YAY CHRISTMAS PHUN!]");
  104.             SendClientMessage( playerid, -1, "Write again /tree to kill it! You murderer!");
  105.  
  106.             #endif
  107.             ShowTree(  playerid  );
  108.         }
  109.         return true;
  110.     }
  111.     return false;
  112. }
  113. public
  114.         OnPlayerConnect(  playerid  )
  115. {
  116.     pTree[ playerid ] = true ;
  117.  
  118.     #if defined V03c
  119.  
  120.     SendClientMessage( playerid, -1, ""#COL_EASY"The Christmas Tree was created by "#COL_BLUE"Zh3r0");
  121.     SendClientMessage( playerid, -1, ""#COL_EASY"Take it as a pleasent present from me!");
  122.     SendClientMessage( playerid, -1, ""#COL_EASY"Type "#COL_BLUE"/tree"#COL_EASY" if you want to hide it!");
  123.  
  124.     #else
  125.  
  126.     SendClientMessage( playerid, -1, "The Christmas Tree was created by Zh3r0");
  127.     SendClientMessage( playerid, -1, "Take it as a pleasent present from me!");
  128.     SendClientMessage( playerid, -1, "Type /tree if you want to hide it!");
  129.  
  130.     #endif
  131.  
  132.     ShowTree(   playerid   );
  133.     return true;
  134. }
  135. public
  136.         UpdateTree(  )
  137. {
  138.     TextDrawColor( Text:ChristmasTree[ 10 ], RGBA ( RedValue , GreenValue , BlueValue , 255 ) );
  139.     TextDrawColor( Text:ChristmasTree[ 11 ], RGBA ( RedValue , GreenValue , BlueValue , 255 ) );
  140.     TextDrawBackgroundColor( Text:ChristmasTree[ 10 ],  RGBA ( RedValue , GreenValue , BlueValue , 255 ) );
  141.     TextDrawBackgroundColor( Text:ChristmasTree[ 11 ],  RGBA ( RedValue , GreenValue , BlueValue , 255 ) );
  142.     TextDrawSetOutline( ChristmasTree[ 10 ], 1);
  143.     TextDrawSetOutline( ChristmasTree[ 11 ], 1);
  144. }
  145. public
  146.         ChangeColors( )
  147. {
  148.     for ( new playerid = 0; playerid < MAX_PLAYERS; playerid++ )
  149.     {
  150.         if ( IsPlayerConnected( playerid ) )
  151.         {
  152.             if ( pTree[ playerid ] == false ) return 0;
  153.         }
  154.     }
  155.     if ( Phase == 0 )
  156.     {
  157.         RedValue += 5;
  158.         UpdateTree( );
  159.         TextDrawShowForAll(Text:ChristmasTree[ 10 ] );
  160.         TextDrawShowForAll(Text:ChristmasTree[ 11 ] );
  161.         if ( RedValue == 255 )Phase = 1;
  162.  
  163.     }
  164.     else if ( Phase == 1 )
  165.     {
  166.         RedValue -= 5;
  167.         BlueValue += 5;
  168.         UpdateTree( );
  169.         TextDrawShowForAll(Text:ChristmasTree[ 10 ] );
  170.         TextDrawShowForAll(Text:ChristmasTree[ 11 ] );
  171.         if ( BlueValue == 255  )Phase = 2;
  172.  
  173.     }
  174.     else if ( Phase == 2 )
  175.     {
  176.         GreenValue += 5;
  177.         BlueValue -= 5;
  178.         UpdateTree( );
  179.         TextDrawShowForAll(Text:ChristmasTree[ 10 ] );
  180.         TextDrawShowForAll(Text:ChristmasTree[ 11 ] );
  181.         if ( GreenValue == 255  )Phase = 3;
  182.     }
  183.     else if ( Phase == 3 )
  184.     {
  185.         RedValue += 5;
  186.         GreenValue -= 5;
  187.         UpdateTree( );
  188.         TextDrawShowForAll(Text:ChristmasTree[ 10 ] );
  189.         TextDrawShowForAll(Text:ChristmasTree[ 11 ] );
  190.         if ( RedValue == 255  )Phase = 4;
  191.     }
  192.     else if ( Phase == 4 )
  193.     {
  194.         PhaseTimes += 1;
  195.         if ( PhaseTimes == 1 )
  196.         {
  197.             TextDrawBackgroundColor(ChristmasTree[ 16 ], -65281);
  198.             TextDrawColor(ChristmasTree[ 16 ], -36561153);
  199.             TextDrawShowForAll(ChristmasTree[ 16 ] );
  200.         }
  201.         if ( PhaseTimes == 2 )
  202.         {
  203.             TextDrawBackgroundColor(ChristmasTree[ 16 ], -36561153);
  204.             TextDrawColor(ChristmasTree[ 16 ], -65281);
  205.             TextDrawShowForAll(ChristmasTree[ 16 ] );
  206.         }
  207.         if ( PhaseTimes == 3 )
  208.         {
  209.             TextDrawBackgroundColor(ChristmasTree[ 16 ], -65281);
  210.             TextDrawColor(ChristmasTree[ 16 ], -36561153);
  211.             TextDrawShowForAll(ChristmasTree[ 16 ] );
  212.         }
  213.         if ( PhaseTimes == 4 )
  214.         {
  215.             TextDrawBackgroundColor(ChristmasTree[ 16 ], -36561153);
  216.             TextDrawColor(ChristmasTree[ 16 ], -65281);
  217.             TextDrawShowForAll(ChristmasTree[ 16 ] );
  218.         }
  219.         if ( PhaseTimes == 5 )
  220.         {
  221.             TextDrawBackgroundColor(ChristmasTree[ 16 ], -65281);
  222.             TextDrawColor(ChristmasTree[ 16 ], -36561153);
  223.             TextDrawShowForAll(ChristmasTree[ 16 ] );
  224.         }
  225.         if ( PhaseTimes == 6 )
  226.         {
  227.             TextDrawBackgroundColor(ChristmasTree[ 16 ], -36561153);
  228.             TextDrawColor(ChristmasTree[ 16 ], -65281);
  229.             TextDrawShowForAll(ChristmasTree[ 16 ] );
  230.         }
  231.         if ( PhaseTimes == 7 )
  232.         {
  233.             TextDrawBackgroundColor(ChristmasTree[ 16 ], -65281);
  234.             TextDrawColor(ChristmasTree[ 16 ], -36561153);
  235.             TextDrawShowForAll(ChristmasTree[ 16 ] );
  236.         }
  237.         if ( PhaseTimes == 8 )
  238.         {
  239.             TextDrawBackgroundColor(ChristmasTree[ 16 ], -36561153);
  240.             TextDrawColor(ChristmasTree[ 16 ], -65281);
  241.             TextDrawShowForAll(ChristmasTree[ 16 ] );
  242.         }
  243.         if ( PhaseTimes == 9 )
  244.         {
  245.             TextDrawBackgroundColor(ChristmasTree[ 16 ], -65281);
  246.             TextDrawColor(ChristmasTree[ 16 ], -36561153);
  247.             TextDrawShowForAll(ChristmasTree[ 16 ] );
  248.             Phase = 1;
  249.             PhaseTimes = 0;
  250.         }
  251.     }
  252.     return 1;
  253. }
  254. public
  255.         DestroyTree(  )
  256. {
  257.     for ( new i = 0; i < 22; i ++ ) TextDrawHideForAll( Text:ChristmasTree[ i ] ),
  258.                                     TextDrawDestroy( Text:ChristmasTree[ i ] );
  259. }
  260.  
  261. public LoadTree(  )
  262. {
  263.  
  264.     ChristmasTree[ 0 ] = TextDrawCreate(585.000000, 403.000000, "~n~");
  265.     TextDrawBackgroundColor(ChristmasTree[ 0 ], 255);
  266.     TextDrawFont(ChristmasTree[ 0 ], 1);
  267.     TextDrawLetterSize(ChristmasTree[ 0 ], 0.500000, 4.799999);
  268.     TextDrawColor(ChristmasTree[ 0 ], -1);
  269.     TextDrawSetOutline(ChristmasTree[ 0 ], 0);
  270.     TextDrawSetProportional(ChristmasTree[ 0 ], 1);
  271.     TextDrawSetShadow(ChristmasTree[ 0 ], 1);
  272.     TextDrawUseBox(ChristmasTree[ 0 ], 1);
  273.     TextDrawBoxColor(ChristmasTree[ 0 ], -1975123713);
  274.     TextDrawTextSize(ChristmasTree[ 0 ], 564.000000, 20.000000);
  275.  
  276.     ChristmasTree[ 1 ] = TextDrawCreate(542.000000, 404.000000, "/");
  277.     TextDrawBackgroundColor(ChristmasTree[ 1 ], 255);
  278.     TextDrawFont(ChristmasTree[ 1 ], 1);
  279.     TextDrawLetterSize(ChristmasTree[ 1 ], 2.499999, 3.199999);
  280.     TextDrawColor(ChristmasTree[ 1 ], 934019327);
  281.     TextDrawSetOutline(ChristmasTree[ 1 ], 0);
  282.     TextDrawSetProportional(ChristmasTree[ 1 ], 1);
  283.     TextDrawSetShadow(ChristmasTree[ 1 ], 0);
  284.  
  285.     ChristmasTree[ 2 ] = TextDrawCreate(607.000000, 404.000000, "/");
  286.     TextDrawBackgroundColor(ChristmasTree[ 2 ], 255);
  287.     TextDrawFont(ChristmasTree[ 2 ], 1);
  288.     TextDrawLetterSize(ChristmasTree[ 2 ], -2.499999, 3.199999);
  289.     TextDrawColor(ChristmasTree[ 2 ], 934019327);
  290.     TextDrawSetOutline(ChristmasTree[ 2 ], 0);
  291.     TextDrawSetProportional(ChristmasTree[ 2 ], 1);
  292.     TextDrawSetShadow(ChristmasTree[ 2 ], 0);
  293.  
  294.     ChristmasTree[ 3 ] = TextDrawCreate(599.000000, 391.000000, "/");
  295.     TextDrawBackgroundColor(ChristmasTree[ 3 ], 255);
  296.     TextDrawFont(ChristmasTree[ 3 ], 1);
  297.     TextDrawLetterSize(ChristmasTree[ 3 ], -1.789999, 3.199999);
  298.     TextDrawColor(ChristmasTree[ 3 ], 934019327);
  299.     TextDrawSetOutline(ChristmasTree[ 3 ], 0);
  300.     TextDrawSetProportional(ChristmasTree[ 3 ], 1);
  301.     TextDrawSetShadow(ChristmasTree[ 3 ], 0);
  302.  
  303.     ChristmasTree[ 4 ] = TextDrawCreate(549.000000, 391.000000, "/");
  304.     TextDrawBackgroundColor(ChristmasTree[ 4 ], 255);
  305.     TextDrawFont(ChristmasTree[ 4 ], 1);
  306.     TextDrawLetterSize(ChristmasTree[ 4 ], 1.799999, 3.199999);
  307.     TextDrawColor(ChristmasTree[ 4 ], 934019327);
  308.     TextDrawSetOutline(ChristmasTree[ 4 ], 0);
  309.     TextDrawSetProportional(ChristmasTree[ 4 ], 1);
  310.     TextDrawSetShadow(ChristmasTree[ 4 ], 0);
  311.  
  312.     ChristmasTree[ 5 ] = TextDrawCreate(596.000000, 379.000000, "/");
  313.     TextDrawBackgroundColor(ChristmasTree[ 5 ], 255);
  314.     TextDrawFont(ChristmasTree[ 5 ], 1);
  315.     TextDrawLetterSize(ChristmasTree[ 5 ], -1.679998, 3.199999);
  316.     TextDrawColor(ChristmasTree[ 5 ], 934019327);
  317.     TextDrawSetOutline(ChristmasTree[ 5 ], 0);
  318.     TextDrawSetProportional(ChristmasTree[ 5 ], 1);
  319.     TextDrawSetShadow(ChristmasTree[ 5 ], 0);
  320.  
  321.     ChristmasTree[ 6 ] = TextDrawCreate(553.000000, 379.000000, "/");
  322.     TextDrawBackgroundColor(ChristmasTree[ 6 ], 255);
  323.     TextDrawFont(ChristmasTree[ 6 ], 1);
  324.     TextDrawLetterSize(ChristmasTree[ 6 ], 1.500000, 3.199999);
  325.     TextDrawColor(ChristmasTree[ 6 ], 934019327);
  326.     TextDrawSetOutline(ChristmasTree[ 6 ], 0);
  327.     TextDrawSetProportional(ChristmasTree[ 6 ], 1);
  328.     TextDrawSetShadow(ChristmasTree[ 6 ], 0);
  329.  
  330.     ChristmasTree[ 7 ] = TextDrawCreate(594.000000, 363.000000, "/");
  331.     TextDrawBackgroundColor(ChristmasTree[ 7 ], 255);
  332.     TextDrawFont(ChristmasTree[ 7 ], 0);
  333.     TextDrawLetterSize(ChristmasTree[ 7 ], -1.359998, 4.199998);
  334.     TextDrawColor(ChristmasTree[ 7 ], 934019327);
  335.     TextDrawSetOutline(ChristmasTree[ 7 ], 0);
  336.     TextDrawSetProportional(ChristmasTree[ 7 ], 1);
  337.     TextDrawSetShadow(ChristmasTree[ 7 ], 0);
  338.  
  339.     ChristmasTree[ 8 ] = TextDrawCreate(554.000000, 361.000000, "/");
  340.     TextDrawBackgroundColor(ChristmasTree[ 8 ], 255);
  341.     TextDrawFont(ChristmasTree[ 8 ], 0);
  342.     TextDrawLetterSize(ChristmasTree[ 8 ], 1.500000, 4.499999);
  343.     TextDrawColor(ChristmasTree[ 8 ], 934019327);
  344.     TextDrawSetOutline(ChristmasTree[ 8 ], 0);
  345.     TextDrawSetProportional(ChristmasTree[ 8 ], 1);
  346.     TextDrawSetShadow(ChristmasTree[ 8 ], 0);
  347.  
  348.     ChristmasTree[ 9 ] = TextDrawCreate(585.000000, 382.000000, "~n~");
  349.     TextDrawBackgroundColor(ChristmasTree[ 9 ], 255);
  350.     TextDrawFont(ChristmasTree[ 9 ], 1);
  351.     TextDrawLetterSize(ChristmasTree[ 9 ], 0.509998, 4.299999);
  352.     TextDrawColor(ChristmasTree[ 9 ], -1);
  353.     TextDrawSetOutline(ChristmasTree[ 9 ], 0);
  354.     TextDrawSetProportional(ChristmasTree[ 9 ], 1);
  355.     TextDrawSetShadow(ChristmasTree[ 9 ], 1);
  356.     TextDrawUseBox(ChristmasTree[ 9 ], 1);
  357.     TextDrawBoxColor(ChristmasTree[ 9 ], 934019327);
  358.     TextDrawTextSize(ChristmasTree[ 9 ], 564.000000, 20.000000);
  359.  
  360.     ChristmasTree[ 10 ] = TextDrawCreate(549.000000, 420.000000, "/");
  361.     TextDrawBackgroundColor(ChristmasTree[ 10 ], 65535);
  362.     TextDrawFont(ChristmasTree[ 10 ], 0);
  363.     TextDrawLetterSize(ChristmasTree[ 10 ], 3.109998, -1.700000);
  364.     TextDrawColor(ChristmasTree[ 10 ], 65535);
  365.     TextDrawSetOutline(ChristmasTree[ 10 ], 1);
  366.     TextDrawSetProportional(ChristmasTree[ 10 ], 1);
  367.  
  368.     ChristmasTree[ 11 ] = TextDrawCreate(555.000000, 400.000000, "/");
  369.     TextDrawBackgroundColor(ChristmasTree[ 11 ], 65535);
  370.     TextDrawFont(ChristmasTree[ 11 ], 0);
  371.     TextDrawLetterSize(ChristmasTree[ 11 ], 2.589998, -1.700000);
  372.     TextDrawColor(ChristmasTree[ 11 ], 65535);
  373.     TextDrawSetOutline(ChristmasTree[ 11 ], 1);
  374.     TextDrawSetProportional(ChristmasTree[ 11 ], 1);
  375.  
  376.     ChristmasTree[ 12 ] = TextDrawCreate(554.000000, 435.000000, "~w~~h~T~n~  ~p~~h~T~n~~n~ ~r~~h~T   ~b~~h~T");
  377.     TextDrawBackgroundColor(ChristmasTree[ 12 ], -65281);
  378.     TextDrawFont(ChristmasTree[ 12 ], 1);
  379.     TextDrawLetterSize(ChristmasTree[ 12 ], 0.300000, -1.100000);
  380.     TextDrawColor(ChristmasTree[ 12 ], -65281);
  381.     TextDrawSetOutline(ChristmasTree[ 12 ], 0);
  382.     TextDrawSetProportional(ChristmasTree[ 12 ], 1);
  383.     TextDrawSetShadow(ChristmasTree[ 12 ], 0);
  384.  
  385.     ChristmasTree[ 13 ] = TextDrawCreate(565.000000, 411.000000, "~y~~h~T~n~~n~~r~~h~T");
  386.     TextDrawBackgroundColor(ChristmasTree[ 13 ], -65281);
  387.     TextDrawFont(ChristmasTree[ 13 ], 1);
  388.     TextDrawLetterSize(ChristmasTree[ 13 ], 0.300000, -1.100000);
  389.     TextDrawColor(ChristmasTree[ 13 ], -65281);
  390.     TextDrawSetOutline(ChristmasTree[ 13 ], 0);
  391.     TextDrawSetProportional(ChristmasTree[ 13 ], 1);
  392.     TextDrawSetShadow(ChristmasTree[ 13 ], 0);
  393.  
  394.     ChristmasTree[ 14 ] = TextDrawCreate(544.000000, 440.000000, "~y~~h~T          ~b~~h~~h~T");
  395.     TextDrawBackgroundColor(ChristmasTree[ 14 ], -65281);
  396.     TextDrawFont(ChristmasTree[ 14 ], 1);
  397.     TextDrawLetterSize(ChristmasTree[ 14 ], 0.300000, -1.100000);
  398.     TextDrawColor(ChristmasTree[ 14 ], -65281);
  399.     TextDrawSetOutline(ChristmasTree[ 14 ], 0);
  400.     TextDrawSetProportional(ChristmasTree[ 14 ], 1);
  401.     TextDrawSetShadow(ChristmasTree[ 14 ], 0);
  402.  
  403.     ChristmasTree[ 15 ] = TextDrawCreate(524.000000, 427.000000, "O");
  404.     TextDrawBackgroundColor(ChristmasTree[ 15 ], 255);
  405.     TextDrawFont(ChristmasTree[ 15 ], 1);
  406.     TextDrawLetterSize(ChristmasTree[ 15 ], 3.499998, 8.000000);
  407.     TextDrawColor(ChristmasTree[ 15 ], -1);
  408.     TextDrawSetOutline(ChristmasTree[ 15 ], 0);
  409.     TextDrawSetProportional(ChristmasTree[ 15 ], 1);
  410.     TextDrawSetShadow(ChristmasTree[ 15 ], 1);
  411.  
  412.     ChristmasTree[ 16 ] = TextDrawCreate(561.000000, 358.000000, "]");
  413.     TextDrawBackgroundColor(ChristmasTree[ 16 ], -65281);
  414.     TextDrawFont(ChristmasTree[ 16 ], 0);
  415.     TextDrawLetterSize(ChristmasTree[ 16 ], 0.800000, 2.499999);
  416.     TextDrawColor(ChristmasTree[ 16 ], -36561153);
  417.     TextDrawSetOutline(ChristmasTree[ 16 ], 0);
  418.     TextDrawSetProportional(ChristmasTree[ 16 ], 1);
  419.     TextDrawSetShadow(ChristmasTree[ 16 ], 1);
  420.  
  421.     ChristmasTree[ 17 ] = TextDrawCreate(581.000000, 422.000000, "~r~~h~~h~T");
  422.     TextDrawBackgroundColor(ChristmasTree[ 17 ], -65281);
  423.     TextDrawFont(ChristmasTree[ 17 ], 1);
  424.     TextDrawLetterSize(ChristmasTree[ 17 ], 0.300000, -1.100000);
  425.     TextDrawColor(ChristmasTree[ 17 ], -65281);
  426.     TextDrawSetOutline(ChristmasTree[ 17 ], 0);
  427.     TextDrawSetProportional(ChristmasTree[ 17 ], 1);
  428.     TextDrawSetShadow(ChristmasTree[ 17 ], 0);
  429.  
  430.     ChristmasTree[ 18 ] = TextDrawCreate(582.000000, 422.000000, "O");
  431.     TextDrawBackgroundColor(ChristmasTree[ 18 ], -1);
  432.     TextDrawFont(ChristmasTree[ 18 ], 1);
  433.     TextDrawLetterSize(ChristmasTree[ 18 ], 3.499998, 8.000000);
  434.     TextDrawColor(ChristmasTree[ 18 ], -1);
  435.     TextDrawSetOutline(ChristmasTree[ 18 ], 0);
  436.     TextDrawSetProportional(ChristmasTree[ 18 ], 1);
  437.     TextDrawSetShadow(ChristmasTree[ 18 ], 3);
  438.  
  439.     ChristmasTree[ 19 ] = TextDrawCreate(569.000000, 384.000000, "O");
  440.     TextDrawBackgroundColor(ChristmasTree[ 19 ], 934019327);
  441.     TextDrawFont(ChristmasTree[ 19 ], 1);
  442.     TextDrawLetterSize(ChristmasTree[ 19 ], 0.409999, -0.800000);
  443.     TextDrawColor(ChristmasTree[ 19 ], 934019327);
  444.     TextDrawSetOutline(ChristmasTree[ 19 ], 1);
  445.     TextDrawSetProportional(ChristmasTree[ 19 ], 1);
  446.  
  447.     ChristmasTree[ 20 ] = TextDrawCreate(560.000000, 430.000000, "~r~~h~Merry~n~~i~xmas");
  448.     TextDrawBackgroundColor(ChristmasTree[ 20 ], -1);
  449.     TextDrawFont(ChristmasTree[ 20 ], 3);
  450.     TextDrawLetterSize(ChristmasTree[ 20 ], 0.360000, 1.000000);
  451.     TextDrawColor(ChristmasTree[ 20 ], 255);
  452.     TextDrawSetOutline(ChristmasTree[ 20 ], 0);
  453.     TextDrawSetProportional(ChristmasTree[ 20 ], 1);
  454.     TextDrawSetShadow(ChristmasTree[ 20 ], -1);
  455.  
  456.     ChristmasTree[ 21 ] = TextDrawCreate(539.000000, 400.000000, ".     ~n~  .  .    .      . ~n~ .   .   .     . .  .~n~     .    . ~n~ .    .       .       . ~n~    .    .     .  . ~n~ .  .   ");
  457.     TextDrawBackgroundColor(ChristmasTree[ 21 ], 255);
  458.     TextDrawFont(ChristmasTree[ 21 ], 1);
  459.     TextDrawLetterSize(ChristmasTree[ 21 ], 0.240000, 0.699999);
  460.     TextDrawColor(ChristmasTree[ 21 ], -1);
  461.     TextDrawSetOutline(ChristmasTree[ 21 ], 0);
  462.     TextDrawSetProportional(ChristmasTree[ 21 ], 1);
  463.     TextDrawSetShadow(ChristmasTree[ 21 ], 0);
  464.  
  465.     ChristmasTree[ 22 ] = TextDrawCreate(638.000000, 360.000000, ".     ~n~  .  .    .      . ~n~ .   .   .     . .  .~n~     .    . ~n~ .    .       .       . ~n~    .    .     .  . ~n~ .  .   ");
  466.     TextDrawAlignment(ChristmasTree[ 22 ], 3);
  467.     TextDrawBackgroundColor(ChristmasTree[ 22 ], -1);
  468.     TextDrawFont(ChristmasTree[ 22 ], 0);
  469.     TextDrawLetterSize(ChristmasTree[ 22 ], 0.270000, 1.000000);
  470.     TextDrawColor(ChristmasTree[ 22 ], -1);
  471.     TextDrawSetOutline(ChristmasTree[ 22 ], 0);
  472.     TextDrawSetProportional(ChristmasTree[ 22 ], 1);
  473.     TextDrawSetShadow(ChristmasTree[ 22 ], -8);
  474.  
  475.     for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
  476.     {
  477.         if(IsPlayerConnected(playerid))
  478.         {
  479.             TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 0 ] );
  480.             TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 1 ] );
  481.             TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 2 ] );
  482.             TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 3 ] );
  483.             TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 4 ] );
  484.             TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 5 ] );
  485.             TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 6 ] );
  486.             TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 7 ] );
  487.             TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 8 ] );
  488.             TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 9 ] );
  489.             TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 10 ] );
  490.             TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 11 ] );
  491.             TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 12 ] );
  492.             TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 13 ] );
  493.             TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 14 ] );
  494.             TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 15 ] );
  495.             TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 16 ] );
  496.             TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 17 ] );
  497.             TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 18 ] );
  498.             TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 19 ] );
  499.             TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 20 ] );
  500.             TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 21 ] );
  501.             TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 22 ] );
  502.         }
  503.     }
  504. }
  505.  
  506. public
  507.         ShowTree( playerid )
  508. {
  509.     TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 0 ] );
  510.     TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 1 ] );
  511.     TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 2 ] );
  512.     TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 3 ] );
  513.     TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 4 ] );
  514.     TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 5 ] );
  515.     TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 6 ] );
  516.     TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 7 ] );
  517.     TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 8 ] );
  518.     TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 9 ] );
  519.     TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 10 ] );
  520.     TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 11 ] );
  521.     TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 12 ] );
  522.     TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 13 ] );
  523.     TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 14 ] );
  524.     TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 15 ] );
  525.     TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 16 ] );
  526.     TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 17 ] );
  527.     TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 18 ] );
  528.     TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 19 ] );
  529.     TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 20 ] );
  530.     TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 21 ] );
  531.     TextDrawShowForPlayer(playerid, Text:ChristmasTree[ 22 ] );
  532. }
  533. public
  534.         HideTree( playerid )
  535. {
  536.     TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 0 ] );
  537.     TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 1 ] );
  538.     TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 2 ] );
  539.     TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 3 ] );
  540.     TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 4 ] );
  541.     TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 5 ] );
  542.     TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 6 ] );
  543.     TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 7 ] );
  544.     TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 8 ] );
  545.     TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 9 ] );
  546.     TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 10 ] );
  547.     TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 11 ] );
  548.     TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 12 ] );
  549.     TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 13 ] );
  550.     TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 14 ] );
  551.     TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 15 ] );
  552.     TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 16 ] );
  553.     TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 17 ] );
  554.     TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 18 ] );
  555.     TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 19 ] );
  556.     TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 20 ] );
  557.     TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 21 ] );
  558.     TextDrawHideForPlayer(playerid, Text:ChristmasTree[ 22 ] );
  559. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement