artyom_triodin1

Samp Text Draw Strings

Nov 4th, 2014
787
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.43 KB | None | 0 0
  1. //Scripted by UltraScripter
  2. //Enjoey////
  3.  
  4. #include <a_samp>
  5.  
  6. new Text:Score[MAX_PLAYERS];
  7. new Text:Date[MAX_PLAYERS];
  8. new Text:Time[MAX_PLAYERS];
  9. new Text:Ping[MAX_PLAYERS];
  10. new Text:Name[MAX_PLAYERS];
  11.  
  12. #if defined FILTERSCRIPT
  13.  
  14. #endif
  15.  
  16. public OnFilterScriptInit()
  17. {
  18. print("\n--------------------------------------------------------------------------");
  19. print(" TextDrawStrings By UltraScripter Loaded SucceFully !!! !!! !!!");
  20. print("--------------------------------------------------------------------------\n");
  21. SetTimer("pScore", 5, true);
  22. SetTimer("pDate", 5, true);
  23. SetTimer("pTime", 1000, true);
  24. SetTimer("pPing", 5, true);
  25. SetTimer("pName", 5, true); // In Case If Player Changes The Name !!! !!! !!! / / / / / / / / / / / / / / / / / /
  26. return 1;
  27. }
  28.  
  29. forward pScore(playerid);
  30. forward pDate(playerid);
  31. forward pTime(playerid);
  32. forward pPing(playerid);
  33. forward pName(playerid);
  34.  
  35. public pScore(playerid)
  36. {
  37. new Str[256];
  38. format(Str, sizeof(Str), "Score: %d", GetPlayerScore(playerid));
  39. TextDrawSetString(Score[playerid], Str);
  40. return 1;
  41. }
  42.  
  43. public pDate(playerid)
  44. {
  45. new Str[256];
  46. new y, m, d;
  47. getdate(y, m, d);
  48. format(Str, sizeof(Str), "%02d/%02d/%02d", y, m, d);
  49. TextDrawSetString(Date[playerid], Str);
  50. return 1;
  51. }
  52.  
  53. public pTime(playerid)
  54. {
  55. new Str[256];
  56. new h, k, s;
  57. gettime(h, k, s);
  58. format(Str, sizeof(Str), "%02d:%02d:%02d", h, k, s);
  59. TextDrawSetString(Time[playerid], Str);
  60. return 1;
  61. }
  62.  
  63. public pPing(playerid)
  64. {
  65. new Str[256];
  66. format(Str, sizeof(Str), "Ping: %d", GetPlayerPing(playerid));
  67. TextDrawSetString(Ping[playerid], Str);
  68. return 1;
  69. }
  70.  
  71. public pName(playerid)
  72. {
  73. new Str[256];
  74. new ppName[MAX_PLAYER_NAME];
  75. GetPlayerName(playerid, ppName, sizeof(ppName));
  76. format(Str, sizeof(Str), "%s", ppName);
  77. TextDrawSetString(Name[playerid], Str);
  78. return 1;
  79. }
  80.  
  81. public OnPlayerConnect(playerid)
  82. {
  83. Score[playerid] = TextDrawCreate(498.0, 135.0, " "); // 498.0, 135.0
  84. TextDrawFont(Score[playerid], 3);
  85. TextDrawColor(Score[playerid], 0xFF8000FF);
  86. TextDrawLetterSize(Score[playerid], 0.550000, 0.550000);
  87. TextDrawSetOutline(Score[playerid], 1);
  88. TextDrawShowForPlayer(playerid, Score[playerid]);
  89. Date[playerid] = TextDrawCreate(498.0, 145.0, " ");
  90. TextDrawFont(Date[playerid], 3);
  91. TextDrawColor(Date[playerid], 0xFFFFFFFF);
  92. TextDrawLetterSize(Date[playerid], 0.550000, 0.550000);
  93. TextDrawSetOutline(Date[playerid], 1);
  94. TextDrawShowForPlayer(playerid, Date[playerid]);
  95. Time[playerid] = TextDrawCreate(498.0, 155.0, " ");
  96. TextDrawFont(Time[playerid], 3);
  97. TextDrawColor(Time[playerid], 0xFFFFFFFF);
  98. TextDrawLetterSize(Time[playerid], 0.550000, 0.550000);
  99. TextDrawSetOutline(Time[playerid], 1);
  100. TextDrawShowForPlayer(playerid, Time[playerid]);
  101. Ping[playerid] = TextDrawCreate(498.0, 165.0, " ");
  102. TextDrawFont(Ping[playerid], 3);
  103. TextDrawColor(Ping[playerid], 0xFF8000FF);
  104. TextDrawLetterSize(Ping[playerid], 0.550000, 0.950000);
  105. TextDrawSetOutline(Ping[playerid], 1);
  106. TextDrawShowForPlayer(playerid, Ping[playerid]);
  107. Name[playerid] = TextDrawCreate(498.0, 175.0, " ");
  108. TextDrawFont(Name[playerid], 3);
  109. TextDrawColor(Name[playerid], 0xFF8000FF);
  110. TextDrawLetterSize(Name[playerid], 0.550000, 0.550000); //0.950000, 0.950000
  111. TextDrawSetOutline(Name[playerid], 1);
  112. TextDrawShowForPlayer(playerid, Name[playerid]);
  113. return 1;
  114. }
  115.  
  116. //Scripted by UltraScripter
  117. //Enjoey////
Advertisement
Add Comment
Please, Sign In to add comment