Guest User

TextDraw Problem :L

a guest
Mar 19th, 2013
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 5.79 KB | None | 0 0
  1. #include <a_samp>
  2. #include <zcmd>
  3.  
  4. new Text:BoxDraw0;
  5. new Text:LogoDraw;
  6. new Text:LoginRegDraw;
  7. new Text:WebDraw;
  8. new Text:CreditsDraw;
  9. new Text:QuitDraw;
  10. new Text:OtherDraw;
  11.  
  12. public OnFilterScriptInit()
  13. {
  14.  
  15.     BoxDraw0 = TextDrawCreate(470.000000, -11.000000, "_~n~__~n~__~n~__~n~__~n~__~n~__~n~__~n~__~n~__~n~__~n~__~n~__~n~__~n~__~n~__~n~__~n~__~n~__~n~__~n~_");
  16.     TextDrawBackgroundColor(BoxDraw0, 255);
  17.     TextDrawFont(BoxDraw0, 1);
  18.     TextDrawLetterSize(BoxDraw0, 0.500000, 2.799999);
  19.     TextDrawColor(BoxDraw0, -1);
  20.     TextDrawSetOutline(BoxDraw0, 0);
  21.     TextDrawSetProportional(BoxDraw0, 1);
  22.     TextDrawSetShadow(BoxDraw0, 1);
  23.     TextDrawUseBox(BoxDraw0, 1);
  24.     TextDrawBoxColor(BoxDraw0, 255);
  25.     TextDrawTextSize(BoxDraw0, 650.000000, -38.000000);
  26.     TextDrawSetSelectable(BoxDraw0, 0);
  27.  
  28.     LogoDraw = TextDrawCreate(471.000000, 10.000000, "..:2013 Dogfights:...");
  29.     TextDrawBackgroundColor(LogoDraw, 16777215);
  30.     TextDrawFont(LogoDraw, 1);
  31.     TextDrawLetterSize(LogoDraw, 0.500000, 3.000000);
  32.     TextDrawColor(LogoDraw, -16776961);
  33.     TextDrawSetOutline(LogoDraw, 1);
  34.     TextDrawSetProportional(LogoDraw, 1);
  35.     TextDrawUseBox(LogoDraw, 1);
  36.     TextDrawBoxColor(LogoDraw, 707406536);
  37.     TextDrawTextSize(LogoDraw, 660.000000, -4.000000);
  38.     TextDrawSetSelectable(LogoDraw, 0);
  39.  
  40.     LoginRegDraw = TextDrawCreate(473.000000, 60.000000, "Login / Register");
  41.     TextDrawBackgroundColor(LoginRegDraw, 255);
  42.     TextDrawFont(LoginRegDraw, 1);
  43.     TextDrawLetterSize(LoginRegDraw, 0.639999, 3.300000);
  44.     TextDrawColor(LoginRegDraw, -1);
  45.     TextDrawSetOutline(LoginRegDraw, 0);
  46.     TextDrawSetProportional(LoginRegDraw, 1);
  47.     TextDrawSetShadow(LoginRegDraw, 1);
  48.     TextDrawUseBox(LoginRegDraw, 1);
  49.     TextDrawBoxColor(LoginRegDraw, 707406536);
  50.     TextDrawTextSize(LoginRegDraw, 700.000000, 0.000000);
  51.     TextDrawSetSelectable(LoginRegDraw, true);
  52.  
  53.     WebDraw = TextDrawCreate(475.000000, 115.000000, "Website");
  54.     TextDrawBackgroundColor(WebDraw, 255);
  55.     TextDrawFont(WebDraw, 1);
  56.     TextDrawLetterSize(WebDraw, 0.639999, 3.300000);
  57.     TextDrawColor(WebDraw, -1);
  58.     TextDrawSetOutline(WebDraw, 0);
  59.     TextDrawSetProportional(WebDraw, 1);
  60.     TextDrawSetShadow(WebDraw, 1);
  61.     TextDrawUseBox(WebDraw, 1);
  62.     TextDrawBoxColor(WebDraw, 707406536);
  63.     TextDrawTextSize(WebDraw, 670.000000, 0.000000);
  64.     TextDrawSetSelectable(WebDraw, true);
  65.  
  66.     CreditsDraw = TextDrawCreate(475.000000, 165.000000, "Credits");
  67.     TextDrawBackgroundColor(CreditsDraw, 255);
  68.     TextDrawFont(CreditsDraw, 1);
  69.     TextDrawLetterSize(CreditsDraw, 0.639999, 3.300000);
  70.     TextDrawColor(CreditsDraw, -1);
  71.     TextDrawSetOutline(CreditsDraw, 0);
  72.     TextDrawSetProportional(CreditsDraw, 1);
  73.     TextDrawSetShadow(CreditsDraw, 1);
  74.     TextDrawUseBox(CreditsDraw, 1);
  75.     TextDrawBoxColor(CreditsDraw, 707406536);
  76.     TextDrawTextSize(CreditsDraw, 690.000000, 0.000000);
  77.     TextDrawSetSelectable(CreditsDraw, true);
  78.  
  79.     QuitDraw = TextDrawCreate(477.000000, 392.000000, "QUIT");
  80.     TextDrawBackgroundColor(QuitDraw, -1);
  81.     TextDrawFont(QuitDraw, 1);
  82.     TextDrawLetterSize(QuitDraw, 0.840000, 5.300000);
  83.     TextDrawColor(QuitDraw, -16776961);
  84.     TextDrawSetOutline(QuitDraw, 1);
  85.     TextDrawSetProportional(QuitDraw, 1);
  86.     TextDrawUseBox(QuitDraw, 1);
  87.     TextDrawBoxColor(QuitDraw, 707406536);
  88.     TextDrawTextSize(QuitDraw, 680.000000, -20.000000);
  89.     TextDrawSetSelectable(QuitDraw, true);
  90.  
  91.     OtherDraw = TextDrawCreate(475.000000, 217.000000, "Other");
  92.     TextDrawBackgroundColor(OtherDraw, 255);
  93.     TextDrawFont(OtherDraw, 1);
  94.     TextDrawLetterSize(OtherDraw, 0.639999, 3.300000);
  95.     TextDrawColor(OtherDraw, -1);
  96.     TextDrawSetOutline(OtherDraw, 0);
  97.     TextDrawSetProportional(OtherDraw, 1);
  98.     TextDrawSetShadow(OtherDraw, 1);
  99.     TextDrawUseBox(OtherDraw, 1);
  100.     TextDrawBoxColor(OtherDraw, 707406536);
  101.     TextDrawTextSize(OtherDraw, 730.000000, 0.000000);
  102.     TextDrawSetSelectable(OtherDraw, true);
  103.  
  104.     return 1;
  105. }
  106.  
  107. public OnFilterScriptExit()
  108. {
  109.     TextDrawHideForAll(BoxDraw0);
  110.     TextDrawDestroy(BoxDraw0);
  111.     TextDrawHideForAll(LogoDraw);
  112.     TextDrawDestroy(LogoDraw);
  113.     TextDrawHideForAll(LoginRegDraw);
  114.     TextDrawDestroy(LoginRegDraw);
  115.     TextDrawHideForAll(WebDraw);
  116.     TextDrawDestroy(WebDraw);
  117.     TextDrawHideForAll(CreditsDraw);
  118.     TextDrawDestroy(CreditsDraw);
  119.     TextDrawHideForAll(QuitDraw);
  120.     TextDrawDestroy(QuitDraw);
  121.     TextDrawHideForAll(OtherDraw);
  122.     TextDrawDestroy(OtherDraw);
  123.     return 1;
  124. }
  125.  
  126. public OnPlayerClickTextDraw(playerid, Text:clickedid)
  127. {
  128.     if(_:clickedid != INVALID_TEXT_DRAW)
  129.     {
  130.         if(clickedid == LoginRegDraw)
  131.         {
  132.             SendClientMessage(playerid,-1,"* LOGIN / REG *");
  133.         }
  134.         else if(clickedid == WebDraw)
  135.         {
  136.             SendClientMessage(playerid,-1,"* WEBSITE *");
  137.         }
  138.         else if(clickedid == CreditsDraw)
  139.         {
  140.             SendClientMessage(playerid,-1,"* CREDITS *");
  141.         }
  142.         else if(clickedid == QuitDraw)
  143.         {
  144.             SendClientMessage(playerid,-1,"* QUIT *");
  145.         }
  146.         else if(clickedid == OtherDraw)
  147.         {
  148.             SendClientMessage(playerid,-1,"* OTHER *");
  149.         }
  150.  
  151.         TextDrawHideForPlayer(playerid, BoxDraw0);
  152.         TextDrawHideForPlayer(playerid, LogoDraw);
  153.         TextDrawHideForPlayer(playerid, LoginRegDraw);
  154.         TextDrawHideForPlayer(playerid, WebDraw);
  155.         TextDrawHideForPlayer(playerid, CreditsDraw);
  156.         TextDrawHideForPlayer(playerid, QuitDraw);
  157.         TextDrawHideForPlayer(playerid, OtherDraw);
  158.         CancelSelectTextDraw(playerid);
  159.     }
  160.     return 1;
  161. }
  162.  
  163. CMD:testscreen(playerid, params[])
  164.     {
  165.         TextDrawShowForPlayer(playerid, BoxDraw0);
  166.         TextDrawShowForPlayer(playerid, LogoDraw);
  167.         TextDrawShowForPlayer(playerid, LoginRegDraw);
  168.         TextDrawShowForPlayer(playerid, WebDraw);
  169.         TextDrawShowForPlayer(playerid, CreditsDraw);
  170.         TextDrawShowForPlayer(playerid, QuitDraw);
  171.         TextDrawShowForPlayer(playerid, OtherDraw);
  172.         SelectTextDraw(playerid, 0xA3B4C5FF);
  173.         return 1;
  174.     }
  175.  
  176. public OnPlayerSpawn(playerid)
  177. {
  178.     return 1;
  179. }
Advertisement
Add Comment
Please, Sign In to add comment