BulletRja

bR Cool Welcome Textdraws

Mar 1st, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 10.26 KB | None | 0 0
  1. #define FILTERSCRIPT
  2.  
  3. /* Includes */
  4. #include <a_samp>
  5.  
  6. #define MAX_WELCOME_TDRAW 13 //Max textdraws created.
  7.  
  8. forward HideWelcome(playerid);
  9.  
  10. /* Textdraws Define */
  11. new PlayerText:WELCOME_TEXT[MAX_WELCOME_TDRAW];
  12.  
  13. public HideWelcome(playerid)
  14. {
  15.     for(new x; x<MAX_WELCOME_TDRAW; x++)
  16.     {
  17.         PlayerTextDrawDestroy(playerid, WELCOME_TEXT[x]);
  18.     }
  19.     return 1;
  20. }
  21.  
  22. public OnFilterScriptInit()
  23. {
  24.     print("\n--------------------------------------");
  25.     print(" Cool OnPlayerConnect TextDraws by BulletRaja");
  26.     print("--------------------------------------\n");
  27.     return 1;
  28. }
  29.  
  30. public OnPlayerRequestClass(playerid, classid)
  31. {
  32.     for(new x; x<MAX_WELCOME_TDRAW; x++)
  33.     {
  34.         PlayerTextDrawShow(playerid, WELCOME_TEXT[x]);
  35.     }
  36.  
  37.     new hostname[25], language[25], mapname[25], gamemodetext[25];
  38.     GetServerVarAsString("hostname", hostname, sizeof (hostname));
  39.     GetServerVarAsString("language", language, sizeof (language));
  40.     GetServerVarAsString("mapname", mapname, sizeof (mapname));
  41.     GetServerVarAsString("gamemodetext", gamemodetext, sizeof (gamemodetext));
  42.  
  43.     new pname[MAX_PLAYER_NAME], string[60];
  44.     GetPlayerName(playerid, pname, sizeof(pname));
  45.  
  46.     format(string, 144, "[] Server Name: %s", hostname);
  47.     PlayerTextDrawSetString(playerid, WELCOME_TEXT[5], string);//Textdraw 5
  48.  
  49.     format(string, 144, "[] Server Language: %s", language);
  50.     PlayerTextDrawSetString(playerid, WELCOME_TEXT[6], string);//Textdraw 6
  51.  
  52.     format(string, 144, "[] Server Gamemode: %s", gamemodetext);
  53.     PlayerTextDrawSetString(playerid, WELCOME_TEXT[7], string);//Textdraw 7
  54.  
  55.     format(string, 144, "[] Server Map: %s", mapname);
  56.     PlayerTextDrawSetString(playerid, WELCOME_TEXT[8], string);//Textdraw 8
  57.  
  58.     format(string, 144, "~p~[] ~b~Name: %s", pname);
  59.     PlayerTextDrawSetString(playerid, WELCOME_TEXT[11], string);//Textdraw 11
  60.  
  61.     SetTimerEx("HideWelcome", 5000, false, "i", playerid);
  62.     return 1;
  63. }
  64.  
  65. public OnPlayerConnect(playerid)
  66. {
  67.     //Create the textdraw.
  68.     WELCOME_TEXT[0] = CreatePlayerTextDraw(playerid, 1.859470, 2.166683, "box");
  69.     PlayerTextDrawLetterSize(playerid, WELCOME_TEXT[0], 0.000000, 9.812591);
  70.     PlayerTextDrawTextSize(playerid, WELCOME_TEXT[0], 687.000000, 0.000000);
  71.     PlayerTextDrawAlignment(playerid, WELCOME_TEXT[0], 1), PlayerTextDrawColor(playerid, WELCOME_TEXT[0], -1);
  72.     PlayerTextDrawUseBox(playerid, WELCOME_TEXT[0], 1), PlayerTextDrawBoxColor(playerid, WELCOME_TEXT[0], 150);
  73.     PlayerTextDrawSetShadow(playerid, WELCOME_TEXT[0], 0), PlayerTextDrawBackgroundColor(playerid, WELCOME_TEXT[0], 255);
  74.     PlayerTextDrawFont(playerid, WELCOME_TEXT[0], 1), PlayerTextDrawSetProportional(playerid, WELCOME_TEXT[0], 1);
  75.  
  76.     WELCOME_TEXT[1] = CreatePlayerTextDraw(playerid, -0.014688, 358.000091, "box");
  77.     PlayerTextDrawLetterSize(playerid, WELCOME_TEXT[1], 0.000000, 9.718887);
  78.     PlayerTextDrawTextSize(playerid, WELCOME_TEXT[1], 639.000000, 0.000000);
  79.     PlayerTextDrawAlignment(playerid, WELCOME_TEXT[1], 1), PlayerTextDrawColor(playerid, WELCOME_TEXT[1], -1);
  80.     PlayerTextDrawUseBox(playerid, WELCOME_TEXT[1], 1), PlayerTextDrawBoxColor(playerid, WELCOME_TEXT[1], 150);
  81.     PlayerTextDrawSetShadow(playerid, WELCOME_TEXT[1], 0), PlayerTextDrawBackgroundColor(playerid, WELCOME_TEXT[1], 255);
  82.     PlayerTextDrawFont(playerid, WELCOME_TEXT[1], 1), PlayerTextDrawSetProportional(playerid, WELCOME_TEXT[1], 1);
  83.  
  84.     WELCOME_TEXT[2] = CreatePlayerTextDraw(playerid, 1.859453, 95.500000, "box");
  85.     PlayerTextDrawLetterSize(playerid, WELCOME_TEXT[2], 0.000000, -0.822838);
  86.     PlayerTextDrawTextSize(playerid, WELCOME_TEXT[2], 671.000000, 0.000000);
  87.     PlayerTextDrawAlignment(playerid, WELCOME_TEXT[2], 1), PlayerTextDrawColor(playerid, WELCOME_TEXT[2], -1);
  88.     PlayerTextDrawUseBox(playerid, WELCOME_TEXT[2], 1), PlayerTextDrawBoxColor(playerid, WELCOME_TEXT[2], -16776961);
  89.     PlayerTextDrawSetShadow(playerid, WELCOME_TEXT[2], 0), PlayerTextDrawBackgroundColor(playerid, WELCOME_TEXT[2], 255);
  90.     PlayerTextDrawFont(playerid, WELCOME_TEXT[2], 1), PlayerTextDrawSetProportional(playerid, WELCOME_TEXT[2], 1);
  91.  
  92.     WELCOME_TEXT[3] = CreatePlayerTextDraw(playerid, 2.796497, 358.000030, "box");
  93.     PlayerTextDrawLetterSize(playerid, WELCOME_TEXT[3], 0.000000, -0.822838);
  94.     PlayerTextDrawTextSize(playerid, WELCOME_TEXT[3], 672.000000, 0.000000);
  95.     PlayerTextDrawAlignment(playerid, WELCOME_TEXT[3], 1), PlayerTextDrawColor(playerid, WELCOME_TEXT[3], -1);
  96.     PlayerTextDrawUseBox(playerid, WELCOME_TEXT[3], 1), PlayerTextDrawBoxColor(playerid, WELCOME_TEXT[3], -16776961);
  97.     PlayerTextDrawSetShadow(playerid, WELCOME_TEXT[3], 0), PlayerTextDrawBackgroundColor(playerid, WELCOME_TEXT[3], 255);
  98.     PlayerTextDrawFont(playerid, WELCOME_TEXT[3], 1), PlayerTextDrawSetProportional(playerid, WELCOME_TEXT[3], 1);
  99.  
  100.     WELCOME_TEXT[4] = CreatePlayerTextDraw(playerid, 261.420227, 355.666595, "Server Information");
  101.     PlayerTextDrawLetterSize(playerid, WELCOME_TEXT[4], 0.596310, 1.955833);
  102.     PlayerTextDrawTextSize(playerid, WELCOME_TEXT[4], 767.000000, 0.000000);
  103.     PlayerTextDrawAlignment(playerid, WELCOME_TEXT[4], 1), PlayerTextDrawColor(playerid, WELCOME_TEXT[4], -1);
  104.     PlayerTextDrawSetShadow(playerid, WELCOME_TEXT[4], 0), PlayerTextDrawBackgroundColor(playerid, WELCOME_TEXT[4], 255);
  105.     PlayerTextDrawFont(playerid, WELCOME_TEXT[4], 0), PlayerTextDrawSetProportional(playerid, WELCOME_TEXT[4], 1);
  106.  
  107.     WELCOME_TEXT[5] = CreatePlayerTextDraw(playerid, 47.306015, 376.083282, "");
  108.     PlayerTextDrawLetterSize(playerid, WELCOME_TEXT[5], 0.596310, 1.955833);
  109.     PlayerTextDrawTextSize(playerid, WELCOME_TEXT[5], 767.000000, 0.000000);
  110.     PlayerTextDrawAlignment(playerid, WELCOME_TEXT[5], 1), PlayerTextDrawColor(playerid, WELCOME_TEXT[5], -1);
  111.     PlayerTextDrawSetShadow(playerid, WELCOME_TEXT[5], 0), PlayerTextDrawBackgroundColor(playerid, WELCOME_TEXT[5], 255);
  112.     PlayerTextDrawFont(playerid, WELCOME_TEXT[5], 0), PlayerTextDrawSetProportional(playerid, WELCOME_TEXT[5], 1);
  113.  
  114.     WELCOME_TEXT[6] = CreatePlayerTextDraw(playerid, 47.306015, 394.166625, "");
  115.     PlayerTextDrawLetterSize(playerid, WELCOME_TEXT[6], 0.596310, 1.955833);
  116.     PlayerTextDrawTextSize(playerid, WELCOME_TEXT[6], 767.000000, 0.000000);
  117.     PlayerTextDrawAlignment(playerid, WELCOME_TEXT[6], 1), PlayerTextDrawColor(playerid, WELCOME_TEXT[6], -1);
  118.     PlayerTextDrawSetShadow(playerid, WELCOME_TEXT[6], 0), PlayerTextDrawBackgroundColor(playerid, WELCOME_TEXT[6], 255);
  119.     PlayerTextDrawFont(playerid, WELCOME_TEXT[6], 0), PlayerTextDrawSetProportional(playerid, WELCOME_TEXT[6], 1);
  120.  
  121.     WELCOME_TEXT[7] = CreatePlayerTextDraw(playerid, 47.306015, 412.833312, "");
  122.     PlayerTextDrawLetterSize(playerid, WELCOME_TEXT[7], 0.596310, 1.955833);
  123.     PlayerTextDrawTextSize(playerid, WELCOME_TEXT[7], 767.000000, 0.000000);
  124.     PlayerTextDrawAlignment(playerid, WELCOME_TEXT[7], 1), PlayerTextDrawColor(playerid, WELCOME_TEXT[7], -1);
  125.     PlayerTextDrawSetShadow(playerid, WELCOME_TEXT[7], 0), PlayerTextDrawBackgroundColor(playerid, WELCOME_TEXT[7], 255);
  126.     PlayerTextDrawFont(playerid, WELCOME_TEXT[7], 0), PlayerTextDrawSetProportional(playerid, WELCOME_TEXT[7], 1);
  127.  
  128.     WELCOME_TEXT[8] = CreatePlayerTextDraw(playerid, 47.306015, 430.333312, "");
  129.     PlayerTextDrawLetterSize(playerid, WELCOME_TEXT[8], 0.596310, 1.955833);
  130.     PlayerTextDrawTextSize(playerid, WELCOME_TEXT[8], 767.000000, 0.000000);
  131.     PlayerTextDrawAlignment(playerid, WELCOME_TEXT[8], 1), PlayerTextDrawColor(playerid, WELCOME_TEXT[8], -1);
  132.     PlayerTextDrawSetShadow(playerid, WELCOME_TEXT[8], 0), PlayerTextDrawBackgroundColor(playerid, WELCOME_TEXT[8], 255);
  133.     PlayerTextDrawFont(playerid, WELCOME_TEXT[8], 0), PlayerTextDrawSetProportional(playerid, WELCOME_TEXT[8], 1);
  134.  
  135.     WELCOME_TEXT[9] = CreatePlayerTextDraw(playerid, 264.230957, 379.583343, "box");
  136.     PlayerTextDrawLetterSize(playerid, WELCOME_TEXT[9], 0.000000, -0.775987);
  137.     PlayerTextDrawTextSize(playerid, WELCOME_TEXT[9], 390.000000, 0.000000);
  138.     PlayerTextDrawAlignment(playerid, WELCOME_TEXT[9], 1), PlayerTextDrawColor(playerid, WELCOME_TEXT[9], -1);
  139.     PlayerTextDrawUseBox(playerid, WELCOME_TEXT[9], 1), PlayerTextDrawBoxColor(playerid, WELCOME_TEXT[9], -930873089);
  140.     PlayerTextDrawSetShadow(playerid, WELCOME_TEXT[9], 0), PlayerTextDrawBackgroundColor(playerid, WELCOME_TEXT[9], 255);
  141.     PlayerTextDrawFont(playerid, WELCOME_TEXT[9], 1), PlayerTextDrawSetProportional(playerid, WELCOME_TEXT[9], 1);
  142.  
  143.     WELCOME_TEXT[10] = CreatePlayerTextDraw(playerid, 274.070495, 10.916663, "~g~~h~Welcome ~y~~h~Back");
  144.     PlayerTextDrawLetterSize(playerid, WELCOME_TEXT[10], 0.458565, 3.145834);
  145.     PlayerTextDrawTextSize(playerid, WELCOME_TEXT[10], 544.000000, 0.000000);
  146.     PlayerTextDrawAlignment(playerid, WELCOME_TEXT[10], 1), PlayerTextDrawColor(playerid, WELCOME_TEXT[10], -1);
  147.     PlayerTextDrawSetShadow(playerid, WELCOME_TEXT[10], 0), PlayerTextDrawBackgroundColor(playerid, WELCOME_TEXT[10], 255);
  148.     PlayerTextDrawFont(playerid, WELCOME_TEXT[10], 2), PlayerTextDrawSetProportional(playerid, WELCOME_TEXT[10], 1);
  149.  
  150.     WELCOME_TEXT[11] = CreatePlayerTextDraw(playerid, 243.616561, 58.750007, "");
  151.     PlayerTextDrawLetterSize(playerid, WELCOME_TEXT[11], 0.456691, 1.845001);
  152.     PlayerTextDrawTextSize(playerid, WELCOME_TEXT[11], 544.000000, 0.000000);
  153.     PlayerTextDrawAlignment(playerid, WELCOME_TEXT[11], 1), PlayerTextDrawColor(playerid, WELCOME_TEXT[11], -1);
  154.     PlayerTextDrawSetShadow(playerid, WELCOME_TEXT[11], 0), PlayerTextDrawBackgroundColor(playerid, WELCOME_TEXT[11], 255);
  155.     PlayerTextDrawFont(playerid, WELCOME_TEXT[11], 2), PlayerTextDrawSetProportional(playerid, WELCOME_TEXT[11], 1);
  156.  
  157.     WELCOME_TEXT[12] = CreatePlayerTextDraw(playerid, 278.755065, 41.250061, "box");
  158.     PlayerTextDrawLetterSize(playerid, WELCOME_TEXT[12], 0.000000, -0.775987);
  159.     PlayerTextDrawTextSize(playerid, WELCOME_TEXT[12], 415.000000, 0.000000);
  160.     PlayerTextDrawAlignment(playerid, WELCOME_TEXT[12], 1), PlayerTextDrawColor(playerid, WELCOME_TEXT[12], -1);
  161.     PlayerTextDrawUseBox(playerid, WELCOME_TEXT[12], 1), PlayerTextDrawBoxColor(playerid, WELCOME_TEXT[12], -930873089);
  162.     PlayerTextDrawSetShadow(playerid, WELCOME_TEXT[12], 0), PlayerTextDrawBackgroundColor(playerid, WELCOME_TEXT[12], 255);
  163.     PlayerTextDrawFont(playerid, WELCOME_TEXT[12], 1), PlayerTextDrawSetProportional(playerid, WELCOME_TEXT[12], 1);
  164.     return 1;
  165. }
Add Comment
Please, Sign In to add comment