Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.70 KB | None | 0 0
  1. // Глобальные текстдравы
  2. new Text:hunger_TD[2];
  3.  
  4. hunger_TD[0] = TextDrawCreate(497.9999, 123.4478, "Box"); // пусто
  5. TextDrawLetterSize(hunger_TD[0], 0.0000, 0.5666);
  6. TextDrawTextSize(hunger_TD[0], 605.4995, 0.0000);
  7. TextDrawAlignment(hunger_TD[0], 1);
  8. TextDrawColor(hunger_TD[0], -1);
  9. TextDrawUseBox(hunger_TD[0], 1);
  10. TextDrawBoxColor(hunger_TD[0], 255);
  11. TextDrawBackgroundColor(hunger_TD[0], 255);
  12. TextDrawFont(hunger_TD[0], 1);
  13. TextDrawSetProportional(hunger_TD[0], 1);
  14. TextDrawSetShadow(hunger_TD[0], 0);
  15.  
  16. hunger_TD[1] = TextDrawCreate(497.9999, 133.3480, "Box"); // пусто
  17. TextDrawLetterSize(hunger_TD[1], 0.0000, 0.5666);
  18. TextDrawTextSize(hunger_TD[1], 605.4995, 0.0000);
  19. TextDrawAlignment(hunger_TD[1], 1);
  20. TextDrawColor(hunger_TD[1], -1);
  21. TextDrawUseBox(hunger_TD[1], 1);
  22. TextDrawBoxColor(hunger_TD[1], 255);
  23. TextDrawBackgroundColor(hunger_TD[1], 255);
  24. TextDrawFont(hunger_TD[1], 1);
  25. TextDrawSetProportional(hunger_TD[1], 1);
  26. TextDrawSetShadow(hunger_TD[1], 0);
  27.  
  28.  
  29.  
  30. // Текстдравы для игроков
  31. new PlayerText:hunger_PTD[MAX_PLAYERS][2];
  32.  
  33. hunger_PTD[playerid][0] = CreatePlayerTextDraw(playerid, 497.2998, 122.7592, "LD_SPAC:white"); // пусто
  34. PlayerTextDrawTextSize(playerid, hunger_PTD[playerid][0], 0.0, 6.0000);
  35. PlayerTextDrawAlignment(playerid, hunger_PTD[playerid][0], 1);
  36. PlayerTextDrawColor(playerid, hunger_PTD[playerid][0], 8388863);
  37. PlayerTextDrawBackgroundColor(playerid, hunger_PTD[playerid][0], 255);
  38. PlayerTextDrawFont(playerid, hunger_PTD[playerid][0], 4);
  39. PlayerTextDrawSetProportional(playerid, hunger_PTD[playerid][0], 0);
  40. PlayerTextDrawSetShadow(playerid, hunger_PTD[playerid][0], 0);
  41.  
  42. hunger_PTD[playerid][1] = CreatePlayerTextDraw(playerid, 497.2998, 132.5594, "LD_SPAC:white"); // пусто
  43. PlayerTextDrawTextSize(playerid, hunger_PTD[playerid][1], 0.0, 6.0000);
  44. PlayerTextDrawAlignment(playerid, hunger_PTD[playerid][1], 1);
  45. PlayerTextDrawColor(playerid, hunger_PTD[playerid][1], -5963521);
  46. PlayerTextDrawBackgroundColor(playerid, hunger_PTD[playerid][1], 255);
  47. PlayerTextDrawFont(playerid, hunger_PTD[playerid][1], 4);
  48. PlayerTextDrawSetProportional(playerid, hunger_PTD[playerid][1], 0);
  49. PlayerTextDrawSetShadow(playerid, hunger_PTD[playerid][1], 0);
  50.  
  51.  
  52.  
  53. stock UpdateHunger(playerid)
  54. {
  55. new Float: size = 0.0;
  56. for(new i; i < PlayerInfo[playerid][pHunger]; i ++) size += 9.18;
  57. PlayerTextDrawTextSize(playerid, hunger_PTD[playerid][0], size, 6.0000);
  58. PlayerTextDrawShow(playerid, hunger_PTD][playerid][0]);
  59.  
  60. size = 0.0;
  61. for(new i; i < PlayerInfo[playerid][pThirst]; i ++) size += 9.18;
  62. PlayerTextDrawTextSize(playerid, hunger_PTD[playerid][1], size, 6.0000);
  63. PlayerTextDrawShow(playerid, hunger_PTD][playerid][1]);
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement