Advertisement
Guest User

DiiMeNoR

a guest
Apr 17th, 2014
1,836
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 5.91 KB | None | 0 0
  1. /*
  2. ||||||||       ||  ||  ||||||       ||||||  |||||||||||  ||||||         ||  ||||||||||||  ||||||||
  3. ||     ||              ||   ||     ||   ||  ||           ||   ||        ||  ||        ||  ||     ||
  4. ||       ||    ||  ||  ||    ||   ||    ||  ||           ||    ||       ||  ||        ||  ||      ||
  5. ||        ||   ||  ||  ||     || ||     ||  ||           ||     ||      ||  ||        ||  ||       ||
  6. ||        ||   ||  ||  ||      ||||     ||  ||           ||      ||     ||  ||        ||  |||||||||||
  7. ||        ||   ||  ||  ||               ||  |||||||||    ||       ||    ||  ||        ||  ||    ||
  8. ||        ||   ||  ||  ||               ||  ||           ||        ||   ||  ||        ||  ||     ||
  9. ||       ||    ||  ||  ||               ||  ||           ||         ||  ||  ||        ||  ||      ||
  10. ||     ||      ||  ||  ||               ||  ||       ||  ||          || ||  ||        ||  ||      ||
  11. ||||||||       ||  ||  ||               ||  |||||||||||  ||           ||||  ||||||||||||  ||       ||
  12.  
  13.  
  14.  
  15.                                     ||         ||
  16.  
  17.                                          | |
  18.                                 ||                  ||
  19.                                  ||||||||||||||||||||
  20. */
  21.  
  22. #include < a_samp >
  23.  
  24. new Text:Atingir[MAX_PLAYERS];
  25. new Text:Atingido[MAX_PLAYERS];
  26.  
  27. public OnFilterScriptInit()
  28. {
  29.     for(new i; i < MAX_PLAYERS; ++i)
  30.     {
  31.         Atingir[i] = TextDrawCreate(168.000000,319.000000, " ");
  32.         TextDrawColor(Atingir[i], 0x33FF10AA);
  33.         TextDrawBackgroundColor(Atingir[i], 255);
  34.         TextDrawFont(Atingir[i], 2);
  35.         TextDrawSetProportional(Atingir[i], 1);
  36.         TextDrawLetterSize(Atingir[i], 1.000000,2.699999);
  37.         TextDrawSetOutline(Atingir[i], 1);
  38.         TextDrawAlignment(Atingir[i], 2);
  39.  
  40.         Atingido[i] = TextDrawCreate(168.000000,319.000000, " ");
  41.         TextDrawColor(Atingido[i], 0xFF0026AA);
  42.         TextDrawBackgroundColor(Atingido[i], 255);
  43.         TextDrawFont(Atingido[i], 2);
  44.         TextDrawSetProportional(Atingido[i], 1);
  45.         TextDrawLetterSize(Atingido[i], 1.000000,2.699999);
  46.         TextDrawSetOutline(Atingido[i], 1);
  47.         TextDrawAlignment(Atingido[i], 2);
  48.     }
  49.     return 1;
  50. }
  51. main()
  52. {
  53.     print(" _______________________________________");
  54.     print("|---------------------------------------|");
  55.     print("|»»   Dano Textdraw + Info Tiro       ««|");
  56.     print("|»»        DiiMeNoR Street              ««|");
  57.     print("|           diimenor.1533               |");
  58.     print("|---------------------------------------|");
  59.     printf("%c", 7 );
  60.  
  61.  
  62. }
  63. forward OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid);
  64. public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
  65. {
  66.     new DiiMeNoR[50];
  67.     format(DiiMeNoR, 50, "DANO %.0f", amount);
  68.     TextDrawSetString(Atingir[playerid], DiiMeNoR);
  69.     TextDrawShowForPlayer(playerid, Atingir[playerid]);
  70.     SetTimerEx("RemoveTextDraw", 2000, false, "i", playerid);
  71.     return 1;
  72. }
  73.  
  74. forward RemoveTextDraw(playerid);
  75. public RemoveTextDraw(playerid)
  76. {
  77.     TextDrawHideForPlayer(playerid, Atingido[playerid]);
  78.     TextDrawHideForPlayer(playerid, Atingir[playerid]);
  79.     return 1;
  80. }
  81. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
  82. {
  83.     new BODY_PART_HEAD, BODY_PART_TORSO, BODY_PART_RIGHT_ARM, BODY_PART_LEFT_ARM, BODY_PART_RIGHT_LEG, BODY_PART_LEFT_LEG, BODY_PART_GROIN;
  84.     if(bodypart == BODY_PART_HEAD)
  85.     {
  86.         new Atirador[MAX_PLAYER_NAME],DiiMeNoR[120];
  87.         GetPlayerName(issuerid, Atirador, sizeof (Atirador));
  88.         format(DiiMeNoR, sizeof(DiiMeNoR), "[DiiMeNoR] Você foi atingido na cabeça por um disparo de %s", Atirador);
  89.         SendClientMessage(playerid, -1, DiiMeNoR);
  90.         SetPlayerHealth(playerid, 0);
  91.     }
  92.     if(bodypart == BODY_PART_TORSO)
  93.     {
  94.         new Atirador[MAX_PLAYER_NAME],DiiMeNoR[120];
  95.         GetPlayerName(issuerid, Atirador, sizeof (Atirador));
  96.         format(DiiMeNoR, sizeof(DiiMeNoR), "[DiiMeNoR] Você foi atingido no peitoral por um disparo de %s", Atirador);
  97.         SendClientMessage(playerid, -1, DiiMeNoR);
  98.     }
  99.     if(bodypart == BODY_PART_GROIN)
  100.     {
  101.         new Atirador[MAX_PLAYER_NAME],DiiMeNoR[120];
  102.         GetPlayerName(issuerid, Atirador, sizeof (Atirador));
  103.         format(DiiMeNoR, sizeof(DiiMeNoR), "[DiiMeNoR] Você foi atingido na virilha por um disparo de %s", Atirador);
  104.         SendClientMessage(playerid, -1, DiiMeNoR);
  105.  
  106.     }
  107.     if(bodypart == BODY_PART_RIGHT_ARM)
  108.     {
  109.         new Atirador[MAX_PLAYER_NAME],DiiMeNoR[120];
  110.         GetPlayerName(issuerid, Atirador, sizeof (Atirador));
  111.         format(DiiMeNoR, sizeof(DiiMeNoR), "[DiiMeNoR] Você foi atingido no braço direito por um disparo de %s", Atirador);
  112.         SendClientMessage(playerid, -1, DiiMeNoR);
  113.     }
  114.     if(bodypart == BODY_PART_LEFT_ARM)
  115.     {
  116.         new Atirador[MAX_PLAYER_NAME],DiiMeNoR[120];
  117.         GetPlayerName(issuerid, Atirador, sizeof (Atirador));
  118.         format(DiiMeNoR, sizeof(DiiMeNoR), "[DiiMeNoR] Você foi atingido no braço esquerdo por um disparo de %s", Atirador);
  119.         SendClientMessage(playerid, -1, DiiMeNoR);
  120.     }
  121.     if(bodypart == BODY_PART_RIGHT_LEG)
  122.     {
  123.         new Atirador[MAX_PLAYER_NAME],DiiMeNoR[120];
  124.         GetPlayerName(issuerid, Atirador, sizeof (Atirador));
  125.         format(DiiMeNoR, sizeof(DiiMeNoR), "[DiiMeNoR] Você foi atingido na perna direita por um disparo de %s", Atirador);
  126.         SendClientMessage(playerid, -1, DiiMeNoR);
  127.     }
  128.     if(bodypart == BODY_PART_LEFT_LEG)
  129.     {
  130.         new Atirador[MAX_PLAYER_NAME],DiiMeNoR[120];
  131.         GetPlayerName(issuerid, Atirador, sizeof (Atirador));
  132.         format(DiiMeNoR, sizeof(DiiMeNoR), "[DiiMeNoR] Você foi atingido na perna esquerda por um disparo de %s", Atirador);
  133.         SendClientMessage(playerid, -1, DiiMeNoR);
  134.     }
  135.     new DiiMeNoR[50];
  136.     format(DiiMeNoR, 50, "DANO %.0f", amount);
  137.     TextDrawSetString(Atingido[playerid], DiiMeNoR);
  138.     TextDrawShowForPlayer(playerid, Atingido[playerid]);
  139.     SetTimerEx("RemoveTextDraw", 2000, false, "i", playerid);
  140.     return 1;
  141. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement