Adoniiz

Ver Daño Sacado/Daño Sufrido

Jan 3rd, 2012
417
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.06 KB | None | 0 0
  1.  
  2. /////////////////////////////////////////////////////////////////////////////////////
  3. // Creditos: //
  4. // By Adoniiz. //
  5. /////////////////////////////////////////////////////////////////////////////////////
  6.  
  7. #include <a_samp>
  8. #pragma tabsize 0
  9.  
  10. /////////////////////////////////////////////////////////////////////////////////////
  11.  
  12. new Text:VerVidaQuito[MAX_PLAYERS];
  13. new Text:Dano[MAX_PLAYERS];
  14.  
  15. /////////////////////////////////////////////////////////////////////////////////////
  16.  
  17. forward TiempoEnIrseElDanoSacado(playerid);
  18. forward TiempoEnIrseElDanoSufrido(playerid);
  19.  
  20. /////////////////////////////////////////////////////////////////////////////////////
  21.  
  22. public OnFilterScriptInit()
  23. {
  24. print("\n\n --------------------------------------------");
  25. print(" | Ver Daño Sacado/Daño Sufrido by Adoniiz |");
  26. print(" ---------------------------------------------\n");
  27. for(new playerid = 0; playerid < GetMaxPlayers(); playerid ++)
  28. {
  29. Dano[playerid] = TextDrawCreate(301.000000, 155.000000, "_");
  30. TextDrawBackgroundColor(Dano[playerid], 255);
  31. TextDrawFont(Dano[playerid], 3);
  32. TextDrawLetterSize(Dano[playerid], 0.579999, 1.100000);
  33. TextDrawColor(Dano[playerid], 16777215);
  34. TextDrawSetOutline(Dano[playerid], 0);
  35. TextDrawSetProportional(Dano[playerid], 1);
  36. TextDrawSetShadow(Dano[playerid], 2);
  37.  
  38. VerVidaQuito[playerid] = TextDrawCreate(301.000000, 167.000000, "_");
  39. TextDrawBackgroundColor(VerVidaQuito[playerid], 255);
  40. TextDrawFont(VerVidaQuito[playerid], 3);
  41. TextDrawLetterSize(VerVidaQuito[playerid], 0.579999, 1.100000);
  42. TextDrawColor(VerVidaQuito[playerid], -16776961);
  43. TextDrawSetOutline(VerVidaQuito[playerid], 0);
  44. TextDrawSetProportional(VerVidaQuito[playerid], 1);
  45. TextDrawSetShadow(VerVidaQuito[playerid], 2);
  46. }
  47. return 1;
  48. }
  49. /////////////////////////////////////////////////////////////////////////////////////
  50.  
  51. public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
  52. {
  53. if(damagedid != INVALID_PLAYER_ID)
  54. {
  55. new string[128];
  56. format(string, sizeof(string), "%.0f",amount);
  57. TextDrawSetString(Dano[playerid], string);
  58. TextDrawShowForPlayer(playerid,Dano[playerid]);
  59. SetTimerEx("TiempoEnIrseElDanoSacado", 3000, false, "i", playerid);
  60. }
  61. return 1;
  62. }
  63. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
  64. {
  65. if(issuerid != INVALID_PLAYER_ID)
  66. {
  67. new string[128];
  68. format(string, sizeof(string), "%.0f",amount);
  69. TextDrawSetString(VerVidaQuito[playerid], string);
  70. TextDrawShowForPlayer(playerid, VerVidaQuito[playerid]);
  71. SetTimerEx("TiempoEnIrseElDanoSufrido", 3000, false, "i", playerid);
  72. }
  73. return 1;
  74. }
  75. public TiempoEnIrseElDanoSacado(playerid)
  76. {
  77. TextDrawHideForPlayer(playerid,Dano[playerid]);
  78. return 1;
  79. }
  80.  
  81. public TiempoEnIrseElDanoSufrido(playerid)
  82. {
  83. TextDrawHideForPlayer(playerid,VerVidaQuito[playerid]);
  84. return 1;
  85. }
Advertisement
Add Comment
Please, Sign In to add comment