Advertisement
Guest User

Untitled

a guest
Nov 25th, 2018
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.75 KB | None | 0 0
  1. public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart) {
  2. return 1;
  3. }
  4.  
  5. public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
  6. {
  7. if(damagedid != INVALID_PLAYER_ID) {
  8.  
  9. if(GetPlayerSurfingVehicleID(playerid) != INVALID_VEHICLE_ID) return 1;
  10.  
  11. foreach(new i : Player) {
  12. if(playerSpectateID[i] == playerid) {
  13. if(PlayerInfo[i][pAdmin] >= 1 && ShowDMG[i] == 1) va_sendLongMessage(i, 0xE7AAA5A5, "DMG: %s did %f damage to %s using weapon %s. [hit: %f %f %f] [bodypart: %d]",GetName(playerid),amount,GetName(damagedid),GetWName(weaponid),DMInfo[playerid][0],DMInfo[playerid][1],DMInfo[playerid][2],bodypart);
  14. }
  15. }
  16.  
  17. if(weaponid == WEAPON_PARACHUTE && amount > 10) {
  18. AdmBot(playerid, "Cheats (possible fake damage)", 1);
  19. return 0;
  20. }
  21. if(amount > 10.0 && amount != 54.12 && weaponid == 0) {
  22. AdmBot(playerid, "Cheats (possible fake damage)", 1);
  23. return 0;
  24. }
  25. if(amount < 0) {
  26. AdmBot(playerid, "Cheats (possible fake damage)", 1);
  27. return 0;
  28. }
  29. if(amount > 9.8 && amount < 9.9 && weaponid == WEAPON_M4) {
  30. AdmBot(playerid, "Cheats (possible silent aimbot)", 1);
  31. return 0;
  32. }
  33. if(amount == 46 && weaponid == WEAPON_DEAGLE) {
  34. AdmBot(playerid, "Cheats (possible silent aimbot)", 1);
  35. return 0;
  36. }
  37. if(amount == 24.642856 && weaponid == WEAPON_RIFLE) {
  38. AdmBot(playerid, "Cheats (possible silent aimbot)", 1);
  39. return 0;
  40. }
  41. if(amount == 9.857147 && weaponid == WEAPON_AK47) {
  42. AdmBot(playerid, "Cheats (possible silent aimbot)", 1);
  43. return 0;
  44. }
  45.  
  46.  
  47. new fpm = PlayerInfo[playerid][pGroup];
  48. new fkm = PlayerInfo[damagedid][pGroup];
  49. for(new turf = 1; turf < sizeof(ZoneInfo); turf++) {
  50. if(IsPlayerInTurf(playerid, turf) && IsPlayerInTurf(damagedid, turf)) {
  51. if(IsAMember(playerid) && IsAMember(damagedid)) {
  52. if(WarInfo[turf][wFaction] == fpm && WarInfo[turf][wAttacker] == fkm || WarInfo[turf][wFaction] == fkm && WarInfo[turf][wAttacker] == fpm) PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
  53. }
  54. }
  55. }
  56. new weaponName[526];
  57. GetWeaponName(weaponid, weaponName, sizeof (weaponName));
  58.  
  59. if(weaponid == 23 && IsACop(playerid) && TazerON[playerid] == 1){
  60. new chance = random(10);
  61. if(Tazed[damagedid] != 0) return SendClientMessage(playerid, COLOR_ERROR, "Acest jucator este deja prins.");
  62. if(IsACop(damagedid)) return SendClientMessage(playerid, COLOR_ERROR, "Nu poti prinde coechiperii.");
  63. if(IsPlayerInAnyVehicle(damagedid)) return SendClientMessage(playerid, COLOR_ERROR, "Acest jucator este intr-un vehicul.");
  64. switch(chance) {
  65. case 0,2,4,6,8: {
  66.  
  67. va_SendClientMessage(damagedid, COLOR_SYN2,"Ai fost prins de %s pentru 3 secunde.", GetName(playerid));
  68. va_SendClientMessage(playerid, COLOR_SYN2, "L-ai prins pe %s pentru 3 secunde.", GetName(damagedid));
  69. va_ProxDetector(30.0, playerid, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE, "* %s incearca sa-l prinda pe %s, acesta a fost prins.", GetName(playerid) ,GetName(damagedid));
  70. GameTextForPlayer(damagedid, "~r~Tazed", 2500, 3);
  71. TogglePlayerControllableEx(damagedid, 0);
  72. Tazed[damagedid] = 1;
  73. ApplyAnimation(damagedid,"PED","KO_skid_front",4.1,0,1,1,1,0);
  74. amount = 0;
  75. SetTimerEx("unfr", 3000, false, "i", damagedid);
  76. }
  77. case 1,3,5,7,9: {
  78. va_ProxDetector(30.0, playerid, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE, "* %s incearca sa-l prinda pe %s, dar a scapat.", GetName(playerid) ,GetName(damagedid));
  79. amount = 0;
  80. }
  81. }
  82. }
  83. if(PaintType[playerid] > 0) PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
  84. if(PaintType[damagedid] > 0) {
  85. if(PaintTime[PaintType[damagedid]-1] < 1) SetPlayerHealth(damagedid, 100.0);
  86. }
  87. }
  88. return 1;
  89. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement