Death-Gm

ffgh

Mar 21st, 2014
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.05 KB | None | 0 0
  1. #include <a_samp>
  2. #include <getk>
  3.  
  4. main() { print("hueuheuh"); }
  5.  
  6. new Text:Relogio[2][MAX_PLAYERS];
  7.  
  8. new string[1028];
  9.  
  10. new Text:velo[MAX_PLAYERS];
  11. new Text:lata[MAX_PLAYERS];
  12.  
  13. new Text:coins[MAX_PLAYERS];
  14.  
  15. #define Function::%1(%2)\
  16. forward %1(%2);\
  17. public %1(%2)
  18.  
  19.  
  20.  
  21. public OnFilterScriptInit() {
  22. SetTimer("Coins", 2000, 1);
  23. SetTimer("Re", 1000, 1);
  24. SetTimer("veh", 100, 1);
  25. return 1;
  26. }
  27. public OnPlayerConnect(playerid) {
  28. Relogio[0][playerid] = TextDrawCreate(525.000000, 5.000000, "--");
  29. Relogio[1][playerid]= TextDrawCreate(550.000000, 23.000000, "--");
  30. TextDrawAlignment(Relogio[0][playerid], 0);
  31. TextDrawAlignment(Relogio[1][playerid], 0);
  32. TextDrawBackgroundColor(Relogio[0][playerid], 0x000000FF);
  33. TextDrawBackgroundColor(Relogio[1][playerid], 0x000000FF);
  34. TextDrawFont(Relogio[0][playerid], 2);
  35. TextDrawLetterSize(Relogio[0][playerid], 0.399999, 2.000000);
  36. TextDrawFont(Relogio[1][playerid], 2);
  37. TextDrawLetterSize(Relogio[1][playerid], 0.399999, 2.000000);
  38. TextDrawColor(Relogio[0][playerid], 0xFFFFFFFF);
  39. TextDrawColor(Relogio[1][playerid], 0xFFFFFFFF);
  40. TextDrawSetProportional(Relogio[0][playerid], 1);
  41. TextDrawSetProportional(Relogio[1][playerid], 1);
  42. TextDrawSetShadow(Relogio[0][playerid], 1);
  43. TextDrawSetShadow(Relogio[1][playerid], 1);
  44. TextDrawSetOutline(Relogio[0][playerid], 1);
  45. TextDrawSetOutline(Relogio[1][playerid], 1);
  46. TextDrawShowForAll(Relogio[0][playerid]);
  47. TextDrawShowForAll(Relogio[1][playerid]);
  48. coins[playerid] = TextDrawCreate(497.000000, 103.000000, "--");
  49. TextDrawBackgroundColor(coins[playerid], 255);
  50. TextDrawFont(coins[playerid], 1);
  51. TextDrawLetterSize(coins[playerid], 0.500000, 1.000000);
  52. TextDrawColor(coins[playerid], 16711935);
  53. TextDrawSetOutline(coins[playerid], 0);
  54. TextDrawSetProportional(coins[playerid], 1);
  55. TextDrawSetShadow(coins[playerid], 1);
  56. velo[playerid] = TextDrawCreate(462.000000, 377.000000, "--");
  57. TextDrawBackgroundColor(velo[playerid], 65535);
  58. TextDrawFont(velo[playerid], 1);
  59. TextDrawLetterSize(velo[playerid], 0.500000, 2.899999);
  60. TextDrawColor(velo[playerid], -1);
  61. TextDrawSetOutline(velo[playerid], 1);
  62. TextDrawSetProportional(velo[playerid], 1);
  63. lata[playerid] = TextDrawCreate(465.000000, 407.000000, "--");
  64. TextDrawBackgroundColor(lata[playerid], -16711681);
  65. TextDrawFont(lata[playerid], 2);
  66. TextDrawLetterSize(lata[playerid], 0.500000, 2.299999);
  67. TextDrawColor(lata[playerid], -65281);
  68. TextDrawSetOutline(lata[playerid], 0);
  69. TextDrawSetProportional(lata[playerid], 1);
  70. TextDrawSetShadow(lata[playerid], 1);
  71. return 1;
  72. }
  73.  
  74. public OnPlayerDisconnect(playerid) {
  75. TextDrawDestroy(Relogio[0][playerid]);
  76. TextDrawDestroy(Relogio[1][playerid]);
  77. TextDrawHideForAll(Relogio[0][playerid]);
  78. TextDrawHideForAll(Relogio[1][playerid]);
  79. TextDrawDestroy(coins[playerid]);
  80. TextDrawHideForAll(coins[playerid]);
  81. TextDrawHideForAll(velo[playerid]);
  82. TextDrawDestroy(velo[playerid]);
  83. TextDrawHideForAll(lata[playerid]);
  84. TextDrawDestroy(lata[playerid]);
  85. return 1;
  86. }
  87.  
  88. public OnFilterScriptExit() {
  89. return 1;
  90. }
  91.  
  92. Function::Coins(playerid) {
  93. new str[1028];
  94. format(str, sizeof str, "Coins: Desativado!");
  95. TextDrawSetString(coins[playerid], str);
  96. TextDrawShowForPlayer(playerid, coins[playerid]);
  97. return 1;
  98. }
  99.  
  100. Function::veh(playerid) {
  101. new str[1028];
  102. format(str, sizeof str, "Velocidade: %d", PVDP(playerid));
  103. TextDrawSetString(velo[playerid], str);
  104. new strr[1028];
  105. new Float:lataria;
  106. GetVehicleHealth(GetPlayerVehicleID(playerid), lataria);
  107. format(strr, sizeof strr, "Lataria: %0.0f%", lataria);
  108. TextDrawSetString(lata[playerid], strr);
  109. return 1;
  110. }
  111.  
  112. public OnPlayerSpawn(playerid)
  113. {
  114. TextDrawShowForPlayer(playerid, Relogio[0][playerid]);
  115. TextDrawShowForPlayer(playerid, Relogio[1][playerid]);
  116. TextDrawShowForPlayer(playerid, coins[playerid]);
  117. return 1;
  118. }
  119.  
  120. public OnPlayerExitVehicle(playerid, vehicleid) {
  121. TextDrawHideForPlayer(playerid, lata[playerid]);
  122. TextDrawHideForPlayer(playerid, velo[playerid]);
  123. return 1;
  124. }
  125.  
  126. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) {
  127. if(ispassenger) { }
  128. else {
  129. TextDrawShowForPlayer(playerid, lata[playerid]);
  130. TextDrawShowForPlayer(playerid, velo[playerid]);
  131. }
  132. return 1;
  133. }
  134.  
  135. public OnPlayerDeath(playerid)
  136. {
  137. TextDrawHideForPlayer(playerid, lata[playerid]);
  138. TextDrawHideForPlayer(playerid, velo[playerid]);
  139. TextDrawHideForPlayer(playerid, coins[playerid]);
  140. TextDrawHideForPlayer(playerid, Relogio[0][playerid]);
  141. TextDrawHideForPlayer(playerid, Relogio[1][playerid]);
  142. return 1;
  143. }
  144.  
  145.  
  146. Function::Re(playerid) {
  147. new str[1028],
  148. ano,
  149. mes,
  150. dia,
  151. horas,
  152. minutos,
  153. segundos;
  154. getdate(ano, mes, dia);
  155. gettime(horas, minutos, segundos);
  156. format(str, sizeof str, "%02d/%02d/%d", dia, mes, ano);
  157. TextDrawSetString(Relogio[0][playerid], str);
  158. format(string, sizeof string, "%02d:%02d:%02d", horas, minutos, segundos);
  159. TextDrawSetString(Relogio[1][playerid], string);
  160. TextDrawShowForPlayer(playerid, Relogio[0][playerid]);
  161. TextDrawShowForPlayer(playerid, Relogio[1][playerid]);
  162. return 1;
  163. }
Advertisement
Add Comment
Please, Sign In to add comment