Advertisement
SoNNySAMPawno

SoNNy's Animated Christmas Tree

Nov 21st, 2014
857
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.98 KB | None | 0 0
  1. // ( Includes )
  2. #include <a_samp>
  3.  
  4. // ( Defines )
  5. #define function%0(%1) \
  6.             forward%0(%1); public%0(%1)
  7.  
  8. // ( Variables )
  9. static Rotation = 0, Text:TD_Tree[ 2 ];
  10.  
  11. // ( Callbacks )
  12. public OnFilterScriptInit( )
  13. {
  14.     SetTimer( "UpdateBradulet", 100, true );
  15.  
  16.     SetGameModeText( "Test Server" );
  17.  
  18.     TD_Tree[ 0 ] = TextDrawCreate(515.000000, 326.000000, "BRAD");
  19.     TextDrawBackgroundColor(TD_Tree[ 0 ], 0);
  20.     TextDrawFont(TD_Tree[ 0 ], 5);
  21.     TextDrawLetterSize(TD_Tree[ 0 ], 0.500000, 1.000000);
  22.     TextDrawColor(TD_Tree[ 0 ], -1);
  23.     TextDrawSetOutline(TD_Tree[ 0 ], 0);
  24.     TextDrawSetProportional(TD_Tree[ 0 ], 1);
  25.     TextDrawSetShadow(TD_Tree[ 0 ], 1);
  26.     TextDrawUseBox(TD_Tree[ 0 ], 1);
  27.     TextDrawBoxColor(TD_Tree[ 0 ], 0);
  28.     TextDrawTextSize(TD_Tree[ 0 ], 134.000000, 110.000000);
  29.     TextDrawSetPreviewModel( TD_Tree[ 0 ], 19076);
  30.     TextDrawSetPreviewRot( TD_Tree[ 0 ], 0.000000, 0.000000, -55.000000, 1.000000);
  31.     TextDrawSetSelectable(TD_Tree[ 0 ], 0);
  32.  
  33.     TD_Tree[ 1 ] = TextDrawCreate(555.000000, 408.000000, "CADOU");
  34.     TextDrawBackgroundColor(TD_Tree[ 1 ], 0);
  35.     TextDrawFont(TD_Tree[ 1 ], 5);
  36.     TextDrawLetterSize(TD_Tree[ 1 ], 0.500000, 1.000000);
  37.     TextDrawColor(TD_Tree[ 1 ], -1);
  38.     TextDrawSetOutline(TD_Tree[ 1 ], 0);
  39.     TextDrawSetProportional(TD_Tree[ 1 ], 1);
  40.     TextDrawSetShadow(TD_Tree[ 1 ], 1);
  41.     TextDrawUseBox(TD_Tree[ 1 ], 1);
  42.     TextDrawBoxColor(TD_Tree[ 1 ], 0);
  43.     TextDrawTextSize(TD_Tree[ 1 ], 53.000000, 48.000000);
  44.     TextDrawSetPreviewModel( TD_Tree[ 1 ], 19054);
  45.     TextDrawSetPreviewRot( TD_Tree[ 1 ], -40.000000, 0.000000, 0.000000, 1.000000);
  46.     TextDrawSetSelectable(TD_Tree[ 1 ], 0);
  47.     return true;
  48. }
  49. public OnPlayerConnect( playerid )
  50. {
  51.     TextDrawShowForPlayer( playerid, TD_Tree[ 1 ] );
  52.     return true;
  53. }
  54. function UpdateBradulet( )
  55. {
  56.     switch( Rotation )
  57.     {
  58.         case 0..359:    Rotation++;
  59.         case 360:       Rotation = 0;
  60.     }
  61.     TextDrawSetPreviewRot( TD_Tree[ 0 ], 0.000000, 0.000000, Rotation, 1.000000 ); // Update Z Rotation
  62.     TextDrawShowForAll( TD_Tree[ 0 ] );
  63.     return true;
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement