Guest User

Untitled

a guest
Nov 8th, 2019
69
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public OnPlayerDamage(&playerid, &Float:amount, &issuerid, &weapon, &bodypart)
  2. {
  3. if(issuerid != INVALID_PLAYER_ID)
  4. {
  5. if (AdminDuty[playerid] == 1)
  6. return 0;
  7. if(IsACop(issuerid))
  8. {
  9. if(GetPlayerWeapon(issuerid) == 23 && Tazer[issuerid] == 1)
  10. {
  11. if(WantedLevel[playerid] < 1) return GRESKA(issuerid, "Ne mozes tazovati igrace bez WL-a!");
  12. if(PlayerInfo[playerid][pTazovan] > 0) return GRESKA(issuerid, "Ne mozes tazovati igraca koji je vec tazovan!");
  13. if(IsACop(playerid)) return GRESKA(issuerid, "Ne mozes tazovati policajca!");
  14. if(PlayerInfo[playerid][pZGAnovi] > 0 || PlayerInfo[playerid][pZGSnovi] > 0 || PlayerInfo[playerid][pSpecTeam] > 0) return GRESKA(issuerid, "Ne mozes tazovati pripadnike staff teama!");
  15. new Float:healt;
  16. GetPlayerHealth(playerid, healt);
  17. if(healt < 50.0)
  18. {
  19. new string[195];
  20. format(string, sizeof(string), "%s puca tazerom na %s i pogadja.", ImeIgraca(issuerid), GetName(playerid));
  21. ProxDetector(20.0, issuerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  22. TogglePlayerControllable(playerid, 0); PlayerInfo[playerid][pTazovan] = 1;
  23. ApplyAnimation(playerid,"CRACK","crckdeth2",4.0,0,0,0,0,0);
  24. SetTimerEx("TazovanTajmer",SEKUNDE_TAZERA*1000, false, "i", playerid);
  25. }
  26. }
  27. }
  28. if((IsPlayerInAnyVehicle(issuerid) && GetPlayerState(issuerid) == PLAYER_STATE_DRIVER) || PlayerInfo[issuerid][pJailTime] != 0) return 1;
  29. new temp = MozeDobitiWanted(issuerid);
  30. if(minAFK[issuerid] > 0)
  31. {
  32. new Float:heltici;
  33. GetPlayerHealth(issuerid, heltici);
  34. SetPlayerHealth(issuerid, heltici+amount);
  35. INFO(playerid, "Ne napadaj AFK igrace!");
  36. }
  37. if(ORG_ENUM[PlayerInfo[playerid][pClan]][oVrsta] == VRSTA_POLICIJA)
  38. {
  39. if(OnDuty[playerid] == 1)
  40. {
  41. if(temp == 0) return 1;
  42. if(TrebaDobitiWL[issuerid]) return 1;
  43. WantedLevel[issuerid] += 6;
  44. SetPlayerCriminal(issuerid, playerid, "Napad na sluzbeno lice");
  45. TrebaDobitiWL[issuerid] = true;
  46. SetTimerEx("PromeniStanjeWL", 60000*5, false, "d", issuerid);
  47. return 1;
  48. }
  49. }
  50. if(ORG_ENUM[PlayerInfo[playerid][pClan]][oVrsta] == VRSTA_NOVINARI && TalkingLive[playerid] != 255)
  51. {
  52. new Float:heltici, Float:nnX, Float:nnY, Float:nnZ;
  53. GetPlayerHealth(issuerid, heltici);
  54. SetPlayerHealth(issuerid, heltici-5);
  55. GetPlayerPos(issuerid, nnX, nnY, nnZ);
  56. AC_SetPlayerPos(issuerid, nnX, nnY, nnZ+5);
  57. INFO(issuerid, "Ne napadaj novinare dok su u live!");
  58. }
  59. }
  60. return 1;
  61. }
RAW Paste Data