Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ////////////////////////////////////////
- public OnPlayerDamage(&playerid, &Float:amount, &issuerid, &weapon, &bodypart) {
- if(issuerid != INVALID_PLAYER_ID)
- {
- if(IgracPolicajac(issuerid))
- {
- if(weapon == 23)
- {
- new string[512], Float:Poz[3];
- GetPlayerPos(playerid, Poz[0], Poz[1], Poz[2]);
- if(IsPlayerInRangeOfPoint(issuerid, 5.0, Poz[0], Poz[1], Poz[2]))
- {
- if(PlayerInfo[playerid][pTrazeniLevel] == 0) return SCM(issuerid,-1,""PLAVA"[GRESKA] "SIVA"Igrac nema Wanted Level!");
- if(IgracPolicajac(playerid)) return SCM(issuerid,-1,""PLAVA"INFO | "SIVA"Ne mozes tazovati PD!");
- if(PlayerInfo[issuerid][pRank] == 0) return SCM(issuerid,-1,""PLAVA"INFO | "SIVA"Suspendovan si!");
- if(AdminDuty[playerid] == 1) return SCM(issuerid,-1,""PLAVA"INFO | "SIVA"Taj igrac je Admin na duznosti!");
- format(string, sizeof(string), "%s puca tazerom na %s-a i pogadja ga.", GetName(issuerid) ,GetName(playerid));
- ProxDetector(20.0, issuerid, string, PROX,PROX,PROX,PROX,PROX);
- TogglePlayerControllable(playerid, 0); IgracTazovan[playerid] = 1;
- TazerTimer[playerid] = SetTimerEx("TazovanTajmer", 15000, false, "i", playerid);
- OnePlayAnim(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
- }
- }
- }
- }
- /*
- new s[20];
- format(s, 20, "%s (-Damage %.0f)", GetName(playerid),amount);
- TextDrawSetString(TakeDamage[playerid], s);
- TextDrawShowForPlayer(playerid, TakeDamage[playerid]);
- SetTimerEx("DestruirTextoDraw", 1000, false, "i", playerid);*/
- ////////////////////////////////////////////////////////////////////////////
- if (weapon == WEAPON_GRENADE || weapon == 51)
- {
- new Float:health;
- GetPlayerHealth(playerid, health);
- SetPlayerHealth(playerid, (health - (amount * 0.3)));
- FlashbangStage[playerid] = 1;
- HandleFlashbangStage(playerid);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement