Advertisement
Guest User

Untitled

a guest
Oct 9th, 2013
574
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.08 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. forward TimerForRemoveObj(playerid);
  4. new HitObjTime[MAX_PLAYERS];
  5. new RedScreenTime[MAX_PLAYERS];
  6. new AdvTime[MAX_PLAYERS];
  7. new Text:textredscreen;
  8.  
  9. public OnPlayerConnect(playerid)
  10. {
  11. HitObjTime[playerid] = 0;
  12. RedScreenTime[playerid] = 0;
  13. AdvTime[playerid] = 0;
  14. return 1;
  15. }
  16.  
  17. public OnGameModeInit()
  18. {
  19. textredscreen = TextDrawCreate(2.000000, 333.000000, "___");
  20. TextDrawBackgroundColor(textredscreen, 255);
  21. TextDrawFont(textredscreen, 1);
  22. TextDrawLetterSize(textredscreen, 0.790000, 12.700002);
  23. TextDrawColor(textredscreen, -1);
  24. TextDrawSetOutline(textredscreen, 0);
  25. TextDrawSetProportional(textredscreen, 1);
  26. TextDrawSetShadow(textredscreen, 1);
  27. TextDrawUseBox(textredscreen, 1);
  28. TextDrawBoxColor(textredscreen, -16776564);
  29. TextDrawTextSize(textredscreen, 639.000000, 20.000000);
  30. TextDrawSetSelectable(textredscreen, 0);
  31. return 1;
  32. }
  33.  
  34. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
  35. {
  36. if(weaponid != 18 && weaponid != 37 && weaponid != 41)
  37. {
  38. PlayerPlaySound(playerid,5202,0.0,0.0,0.0);
  39. PlayerPlaySound(issuerid,5202,0.0,0.0,0.0);
  40. if(RedScreenTime[playerid] == 0)
  41. {
  42. TextDrawShowForPlayer(playerid, textredscreen);
  43. RedScreenTime[playerid] = 1;
  44. }
  45. if(IsPlayerAttachedObjectSlotUsed(playerid, 1)) RemovePlayerAttachedObject(playerid, 1);
  46. SetPlayerAttachedObject(playerid, 1, 18675, 1, 0.076999,0.052999,-1.553000);
  47. HitObjTime[playerid] = 1;
  48. SetTimerEx("TimerForRemoveObj", 1000, true, "i", playerid);
  49.  
  50. AdvTime[playerid]++;
  51. if(AdvTime[playerid] == 50)
  52. {
  53. SendClientMessage(playerid, -1, "[FS] Improved_damage by brawrr (Skype: Rev1se)");
  54. AdvTime[playerid] = 0;
  55. }
  56. }
  57. return 1;
  58. }
  59.  
  60. public TimerForRemoveObj(playerid)
  61. {
  62. if(HitObjTime[playerid] == 1)
  63. {
  64. HitObjTime[playerid] = 0;
  65. if(IsPlayerAttachedObjectSlotUsed(playerid, 1)) RemovePlayerAttachedObject(playerid, 1);
  66. }
  67. if(RedScreenTime[playerid] == 1)
  68. {
  69. RedScreenTime[playerid] = 0;
  70. TextDrawHideForPlayer(playerid, textredscreen);
  71. }
  72. return 1;
  73. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement