Advertisement
Guest User

Untitled

a guest
Aug 7th, 2015
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.55 KB | None | 0 0
  1. public OnPlayerGiveDamage ( playerid, damagedid, Float: amount, weaponid )
  2. {
  3. if ( damagedid == INVALID_PLAYER_ID ) return 1;
  4. if(groupVariables[pData[playerid][pGroup]][gGroupType] == 1 && OnDuty[playerid] == 1)
  5. {
  6. if(weaponid == 23 && pData[damagedid][pWarrants] >= 4)
  7. {
  8. ApplyAnimation(damagedid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
  9. format(string,sizeof(string),"~r~%s ~g~is tazed!",GetName(damagedid));
  10. GameTextForPlayer(playerid, string, 3000, 1);
  11. Freezes[damagedid] = 1;
  12. SetTimerEx("UnfreezePlayer", 10000, 0, "i", damagedid);
  13. }
  14. }
  15. PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
  16. if(IsPlayerPause(damagedid) == 1 && IsACop(playerid) && pData[damagedid][pWarrants] >= 1)
  17. {
  18. if(GoToJail[damagedid] >= 3)
  19. {
  20. new arrestInfo[3];
  21. new price = pData[damagedid][pWarrants] * 2000;
  22. format(string, sizeof(string), "~w~AFK Suspect~r~Captured~n~Bonus~g~$%d", price);
  23. GameTextForPlayer(playerid, string, 5000, 1);
  24. pData[playerid][pMoney] += price / 2;
  25. Update(playerid, pCashu);
  26.  
  27. pData[damagedid][pMoney] -= price;
  28. Update(damagedid, pCashu);
  29. pData[damagedid][pCrimes] += pData[damagedid][pWarrants];
  30. pData[damagedid][pPrisonTime] = pData[damagedid][pWarrants]*100;
  31. format(string, sizeof(string), "* You are in Jail for %d Seconds and lose $%d because you was AFK with wanted!", pData[damagedid][pPrisonTime], price);
  32. SendClientMessage(damagedid, COLOR_LIGHTRED, string);
  33. if(pData[damagedid][pWarrants] >= 4)
  34. {
  35. format(string, sizeof(string), "( Lastest News ): {FFFFFF}Suspect "THE"%s{FFFFFF} was captured by a cop team because he was AFK!", GetName(damagedid));
  36. SendClientMessageToAll(COLOR_THEG,string);
  37. }
  38. if( damagedid != INVALID_PLAYER_ID )
  39. {
  40. format(string, sizeof(string), "[*]: {FFFFFF} You were arrested by the cop "THE"%s"WHITE"[ID: %d] because you was AFK with wanted!", GetName(damagedid), damagedid);
  41. SendClientMessage(damagedid, COLOR_LIGHTRED, string);
  42. }
  43. Robbing[damagedid] = 0;
  44. DisablePlayerCheckpoint(damagedid);
  45. arrestInfo[2] = random(sizeof(JailSpawns));
  46. pData[damagedid][pPrisonID] = 3;
  47. format(pData[damagedid][pAccent], 20, "No-one");
  48. pData[damagedid][pHealth] = 100.0;
  49. SetPlayerHealth(damagedid, pData[damagedid][pHealth]);
  50. Robbing[damagedid] = 0;
  51. pData[damagedid][pWarrants] = 0;
  52. OnPlayerSpawn(damagedid);
  53. GoToJail[damagedid] = 0;
  54. } else {
  55. GoToJail[damagedid]++;
  56. format(string,sizeof(string),"[ANTI-AFK]: {FFFFFF}Mai trage inca %d gloante in suspect pentru a intra la jail!",4-GoToJail[damagedid]);
  57. SCM(playerid,COLOR_RED,string);
  58. }
  59. }
  60. if(RBTeam[playerid] > 0 && RBTeam[damagedid] > 0 && RBTeam[playerid] == RBTeam[damagedid])
  61. {
  62. new Float:heal;
  63. GetPlayerHealth(damagedid, heal);
  64. SetPlayerHealth(damagedid, heal);
  65. SCM(playerid,COLOR_THEG,"[!!!]: {FFFFFF}Stop trying to kill your group members!");
  66. }
  67. if(RBTeam[playerid] > 0 && RBTeam[damagedid] > 0 && RBEvent[1] == 0)
  68. {
  69. new Weapon[36];
  70. GetWeaponName(weaponid, Weapon, 36);
  71. format(string, sizeof(string),"~g~%s ~w~/ -%0.0f ~g~(%s)",GetName(damagedid), amount, Weapon);
  72. PlayerTextDrawSetString(playerid, DMGRecevied[playerid], string);
  73. PlayerTextDrawShow(playerid, DMGRecevied[playerid]);
  74. RBTaked[playerid] = SetTimerEx("HideRecivied", 4000, false, "ii",playerid,damagedid);
  75.  
  76. format(string, sizeof(string),"~r~%s ~w~/ -%0.0f ~r~(%s)",GetName(playerid), amount, Weapon);
  77. PlayerTextDrawSetString(damagedid, DMGTaked[damagedid], string);
  78. PlayerTextDrawShow(damagedid, DMGTaked[damagedid]);
  79. }
  80. if(GetPlayerWeapon(playerid) == 4 && IsPlayerStreamedIn(playerid, damagedid))
  81. {
  82. amount = 100;
  83. }
  84. new
  85. Float: HP;
  86. HP = GetPlayerHealth(damagedid, HP);
  87. if(Freezes[playerid] == 1){
  88. HP = HP - amount;
  89. }
  90. if(amount >= 151.0 )
  91. {
  92. Kick(playerid);
  93. //[128];
  94. format(string, 256, "Warning: (%d) is using Global Kill.", playerid);
  95. submitToAdmins(string, COLOR_LIGHTRED);
  96. return 0;
  97. }
  98. if(pData[playerid][pWeaponLic] == 0 && pData[playerid][pLevel] == 1 && pData[playerid][pMaterials] < 10 && RBTeam[playerid] == 0)
  99. {
  100. new m;
  101. m = GetPlayerWeapon(playerid);
  102. if((m > 1) && (m < 43))
  103. {
  104. if(m != 9)
  105. {
  106. format(string, sizeof(string), "{f03337}ADM-CMD: %s[ID: %d] possible have weapon hack.", GetName(playerid), playerid);
  107. submitToAdmins(string, COLOR_RED);
  108. }
  109. }
  110. }
  111.  
  112. if(damagedid != INVALID_PLAYER_ID && weaponid == 34 && RBTeam[playerid] == 0)
  113. {
  114. SetPlayerHealth(damagedid, 0.0);
  115. OnPlayerDeath ( damagedid, playerid, weaponid ), noOPD [ damagedid ] = true;
  116. return 1;
  117. }
  118. return 1;
  119. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement