Yes here is it (It has some parts on Serbian language because Gamemode is on that language so I translated this)
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(issuerid != INVALID_PLAYER_ID)
{
////// THIS IS FOR POLICE TASER (tazer = taser maybe is spelled it wrong)
if(IgracPolicajac(issuerid))
{
if(GetPlayerWeapon(issuerid) == 23)
{
new string[128], 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"[ERROR] "SIVA"That player does not have Wanted Level!");
if(IgracPolicajac(playerid)) return SCM(issuerid,-1,""PLAVA"INFO | "SIVA"YOu can not do that on Police Officer!");
if(PlayerInfo[issuerid][pRank] == 0) return SCM(issuerid,-1,""PLAVA"INFO | "SIVA"You are suspended!");
if(AdminDuty[playerid] == 1) return SCM(issuerid,-1,""PLAVA"INFO | "SIVA"That player is Admin on duty!");
format(string, sizeof(string), "%s shoots with tazer on %s.", GetName(issuerid) ,GetName(playerid));
ProxDetector(20.0, issuerid, string, PROX,PROX,PROX,PROX,PROX);
TogglePlayerControllable(playerid, 0); PlayerTazer[playerid] = 1;
TazerTimerr[playerid] = SetTimerEx("TazerTimer", 15000, false, "i", playerid);
OnePlayAnim(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
}
}
}
}
/////// THIS IS DAMAGE TEXTDRAW IT SAYS LIKE [-9 Damage PlyerName]
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);
////// This is something like for granades it is not very important
if (weaponid == WEAPON_GRENADE || weaponid == 51)
{
new Float:health;
GetPlayerHealth(playerid, health);
SetPlayerHealth(playerid, (health - (amount * 0.3)));
FlashbangStage[playerid] = 1;
HandleFlashbangStage(playerid);
}
return 1;
}