Advertisement
GuiButt

Dinheiro e Estrelas em TextDraw

Jul 3rd, 2018
1,583
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 4.01 KB | None | 0 0
  1. /*
  2.             FS feito por João Guilherme Büttenbender - GuiButt
  3. */
  4.  
  5. #include <a_samp>
  6.  
  7. new Text:Box1;
  8. new Text:Box2;
  9. new Text:Box3;
  10. new Text:Box4;
  11. new PlayerText:Dinheiro[MAX_PLAYERS];
  12. new PlayerText:Estrelas[MAX_PLAYERS];
  13.  
  14. public OnPlayerConnect(playerid)
  15. {
  16.     Box1 = TextDrawCreate (613.888793, 79.083328, "usebox");
  17.     TextDrawLetterSize(Box1, 0.000000, 5.277024);
  18.     TextDrawTextSize(Box1, 494.163787, 0.000000);
  19.     TextDrawAlignment(Box1, 1);
  20.     TextDrawColor(Box1, 0);
  21.     TextDrawUseBox(Box1, true);
  22.     TextDrawBoxColor(Box1, 255);
  23.     TextDrawSetShadow(Box1, 0);
  24.     TextDrawSetOutline(Box1, 0);
  25.     TextDrawFont(Box1, 0);
  26.  
  27.     Box2 = TextDrawCreate (612.014587, 80.833335, "usebox");
  28.     TextDrawLetterSize(Box2, 0.000000, 4.868518);
  29.     TextDrawTextSize(Box2, 496.038085, 0.000000);
  30.     TextDrawAlignment(Box2, 1);
  31.     TextDrawColor(Box2, 84214783);
  32.     TextDrawUseBox(Box2, true);
  33.     TextDrawBoxColor(Box2, 84214783);
  34.     TextDrawSetShadow(Box2, 0);
  35.     TextDrawSetOutline(Box2, 0);
  36.     TextDrawFont(Box2, 0);
  37.  
  38.     Box3 = TextDrawCreate (500.849487, 81.083282, "R$");
  39.     TextDrawLetterSize(Box3, 0.456000, 2.000000);
  40.     TextDrawAlignment(Box3, 1);
  41.     TextDrawColor(Box3, 205259007);
  42.     TextDrawSetShadow(Box3, 0);
  43.     TextDrawSetOutline(Box3, 1);
  44.     TextDrawBackgroundColor(Box3, 255);
  45.     TextDrawFont(Box3, 3);
  46.     TextDrawSetProportional(Box3, 1);
  47.    
  48.     Box4 = TextDrawCreate (500.849212, 103.833312, "estrelas");
  49.     TextDrawLetterSize(Box4, 0.456000, 2.000000);
  50.     TextDrawAlignment(Box4, 1);
  51.     TextDrawColor(Box4, 2085617919);
  52.     TextDrawUseBox(Box4, true);
  53.     TextDrawBoxColor(Box4, 0);
  54.     TextDrawSetShadow(Box4, 0);
  55.     TextDrawSetOutline(Box4, 1);
  56.     TextDrawBackgroundColor(Box4, 255);
  57.     TextDrawFont(Box4, 3);
  58.     TextDrawSetProportional(Box4, 1);
  59.  
  60.     Dinheiro[playerid] = CreatePlayerTextDraw ( playerid, 522.784057, 81.083328, "000000000");
  61.     PlayerTextDrawLetterSize(playerid, Dinheiro[playerid], 0.456000, 2.000000);
  62.     PlayerTextDrawAlignment(playerid, Dinheiro[playerid], 1);
  63.     PlayerTextDrawColor(playerid, Dinheiro[playerid], 205259007);
  64.     PlayerTextDrawUseBox(playerid, Dinheiro[playerid], true);
  65.     PlayerTextDrawBoxColor(playerid, Dinheiro[playerid], 0);
  66.     PlayerTextDrawSetShadow(playerid, Dinheiro[playerid], 0);
  67.     PlayerTextDrawSetOutline(playerid, Dinheiro[playerid], 1);
  68.     PlayerTextDrawBackgroundColor(playerid, Dinheiro[playerid], 255);
  69.     PlayerTextDrawFont(playerid, Dinheiro[playerid], 3);
  70.     PlayerTextDrawSetProportional(playerid, Dinheiro[playerid], 1);
  71.  
  72.     Estrelas[playerid] = CreatePlayerTextDraw ( playerid, 580.497802, 103.833335, "000");
  73.     PlayerTextDrawLetterSize(playerid, Estrelas[playerid], 0.456000, 2.000000);
  74.     PlayerTextDrawAlignment(playerid, Estrelas[playerid], 1);
  75.     PlayerTextDrawColor(playerid, Estrelas[playerid], 2085617919);
  76.     PlayerTextDrawUseBox(playerid, Estrelas[playerid], true);
  77.     PlayerTextDrawBoxColor(playerid, Estrelas[playerid], 0);
  78.     PlayerTextDrawSetShadow(playerid, Estrelas[playerid], 0);
  79.     PlayerTextDrawSetOutline(playerid, Estrelas[playerid], 1);
  80.     PlayerTextDrawBackgroundColor(playerid, Estrelas[playerid], 255);
  81.     PlayerTextDrawFont(playerid, Estrelas[playerid], 3);
  82.     PlayerTextDrawSetProportional(playerid, Estrelas[playerid], 1);
  83.     return 1;
  84. }
  85.  
  86. public OnPlayerSpawn(playerid)
  87. {
  88.     TextDrawShowForAll(Box1);
  89.     TextDrawShowForAll(Box2);
  90.     TextDrawShowForAll(Box3);
  91.     TextDrawShowForAll(Box4);
  92.     PlayerTextDrawShow(playerid, Dinheiro[playerid]);
  93.     PlayerTextDrawShow(playerid, Estrelas[playerid]);
  94.     return 1;
  95. }
  96.  
  97. public OnPlayerRequestClass(playerid)
  98. {
  99.     TextDrawHideForAll(Box1);
  100.     TextDrawHideForAll(Box2);
  101.     TextDrawHideForAll(Box3);
  102.     TextDrawHideForAll(Box4);
  103.     PlayerTextDrawHide(playerid, Dinheiro[playerid]);
  104.     PlayerTextDrawHide(playerid, Estrelas[playerid]);
  105.     return 1;
  106. }
  107.  
  108. public OnPlayerUpdate(playerid)
  109. {
  110.     new string[32];
  111.     format(string, sizeof(string), "%09d", GetPlayerMoney(playerid));
  112.     PlayerTextDrawSetString(playerid, Dinheiro[playerid] ,string );
  113.     format(string, sizeof(string), "%d", GetPlayerWantedLevel(playerid));
  114.     PlayerTextDrawSetString(playerid, Estrelas[playerid] ,string );
  115.     return 1;
  116. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement