Advertisement
StefkeZ

Untitled

Aug 5th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. ////////////////////////////////////////
  2. public OnPlayerDamage(&playerid, &Float:amount, &issuerid, &weapon, &bodypart) {
  3. if(issuerid != INVALID_PLAYER_ID)
  4. {
  5. if(IgracPolicajac(issuerid))
  6. {
  7. if(weapon == 23)
  8. {
  9. new string[512], Float:Poz[3];
  10. GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
  11. if(IsPlayerInRangeOfPoint(issuerid, 5.0, Poz[0], Poz[1], Poz[2]))
  12. {
  13. if(PlayerInfo[playerid][pTrazeniLevel] == 0) return SCM(issuerid,-1,""PLAVA"[GRESKA] "SIVA"Igrac nema Wanted Level!");
  14. if(IgracPolicajac(playerid)) return SCM(issuerid,-1,""PLAVA"INFO | "SIVA"Ne mozes tazovati PD!");
  15. if(PlayerInfo[issuerid][pRank] == 0) return SCM(issuerid,-1,""PLAVA"INFO | "SIVA"Suspendovan si!");
  16. if(AdminDuty[playerid] == 1) return SCM(issuerid,-1,""PLAVA"INFO | "SIVA"Taj igrac je Admin na duznosti!");
  17. format(string, sizeof(string), "%s puca tazerom na %s-a i pogadja ga.", GetName(issuerid) ,GetName(playerid));
  18. ProxDetector(20.0, issuerid, string, PROX,PROX,PROX,PROX,PROX);
  19. TogglePlayerControllable(playerid, 0); IgracTazovan[playerid] = 1;
  20. TazerTimer[playerid] = SetTimerEx("TazovanTajmer", 15000, false, "i", playerid);
  21. OnePlayAnim(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
  22. }
  23. }
  24. }
  25. }
  26. /*
  27. new s[20];
  28. format(s, 20, "%s (-Damage %.0f)", GetName(playerid),amount);
  29. TextDrawSetString(TakeDamage[playerid], s);
  30. TextDrawShowForPlayer(playerid, TakeDamage[playerid]);
  31. SetTimerEx("DestruirTextoDraw", 1000, false, "i", playerid);*/
  32. ////////////////////////////////////////////////////////////////////////////
  33. if (weapon == WEAPON_GRENADE || weapon == 51)
  34. {
  35. new Float:health;
  36. GetPlayerHealth(playerid, health);
  37. SetPlayerHealth(playerid, (health - (amount * 0.3)));
  38.  
  39. FlashbangStage[playerid] = 1;
  40.  
  41. HandleFlashbangStage(playerid);
  42. }
  43. return 1;
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement