Guest User

Untitled

a guest
Mar 5th, 2017
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. #define LGreenColor 0x00FF04FF
  4.  
  5.  
  6. #define RedColor 0xE81010FF
  7.  
  8.  
  9. //Creditos PesadaO.
  10. new Text:GiveDamage[MAX_PLAYERS];
  11.  
  12.  
  13. new Text:TakeDamage[MAX_PLAYERS];
  14.  
  15.  
  16. public OnGameModeInit()
  17.  
  18. {
  19.  
  20. for ( new i ; i < MAX_PLAYERS ; ++i )
  21.  
  22. {
  23.  
  24. // GiveDamage = TextDrawCreate(171.000000, 388.000000, " ");
  25.  
  26. TextDrawAlignment(GiveDamage[i], 2);
  27.  
  28. TextDrawBackgroundColor(GiveDamage[i], 255);
  29.  
  30. TextDrawFont(GiveDamage[i], 2);
  31.  
  32. TextDrawLetterSize(GiveDamage[i], 0.160000, 0.599999);
  33.  
  34. // TextDrawColor(GiveDamage[i], 0x00FF04FF);
  35.  
  36. TextDrawSetOutline(GiveDamage[i], 1);
  37.  
  38. TextDrawSetProportional(GiveDamage[i], 1);
  39.  
  40. }
  41.  
  42.  
  43. for(new i; i < MAX_PLAYERS; ++i)
  44.  
  45. {
  46.  
  47. TakeDamage[i] = TextDrawCreate(440.000000,388.000000, "");
  48.  
  49. TextDrawAlignment(TakeDamage[i], 2);
  50.  
  51. TextDrawBackgroundColor(TakeDamage[i], 255);
  52.  
  53. TextDrawFont(TakeDamage[i], 2);
  54.  
  55. TextDrawLetterSize(TakeDamage[i], 0.160000, 0.599999);
  56.  
  57. TextDrawColor(TakeDamage[i], 0xE81010FF);
  58.  
  59. TextDrawSetOutline(TakeDamage[i], 1);
  60.  
  61. TextDrawSetProportional(TakeDamage[i], 1);
  62.  
  63. }
  64.  
  65. return 1;
  66.  
  67. }
  68.  
  69. forward OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid);
  70.  
  71. public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
  72.  
  73. {
  74.  
  75. new s[20];
  76.  
  77. format(s, 20, "", amount);
  78.  
  79. TextDrawSetString(GiveDamage[playerid], s);
  80.  
  81. TextDrawShowForPlayer(playerid, GiveDamage[playerid]);
  82.  
  83. PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
  84.  
  85. SetTimerEx("DestruirTextoDraw", 1000, false, "i", playerid);
  86.  
  87. return 1;
  88.  
  89. }
  90.  
  91.  
  92. forward OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid);
  93.  
  94. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
  95.  
  96. {
  97.  
  98. new s[20];
  99.  
  100. format(s, 20, "", amount);
  101.  
  102. TextDrawSetString(TakeDamage[playerid], s);
  103.  
  104. TextDrawShowForPlayer(playerid, TakeDamage[playerid]);
  105.  
  106. SetTimerEx("DestruirTextoDraw", 1000, false, "i", playerid);
  107.  
  108. return 1;
  109.  
  110. }
  111.  
  112. forward DestruirTextoDraw(playerid);
  113.  
  114. public DestruirTextoDraw(playerid)
  115.  
  116. {
  117.  
  118. TextDrawHideForPlayer(playerid, GiveDamage[playerid]);
  119.  
  120. TextDrawHideForPlayer(playerid, TakeDamage[playerid]);
  121.  
  122. return 1;
  123.  
  124. }
Advertisement
Add Comment
Please, Sign In to add comment