#include <a_samp>public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ){if(hittype == 1){}else{ if(fX < 2 && fY < 2 && fZ < 2 && fX > -2 && fY > -2 && fZ > -2) { } else{ for(new j = 0; j <MAX_PLAYERS; j++) { if(IsPlayerConnected(j)) { if(j == playerid) { } else { new Float:pX, Float:pZ, Float:pY; new pX2, pZ2, pY2; new fX2, fZ2, fY2; GetPlayerPos(j, pX, pY, pZ); pX2 = floatround(pX, floatround_round); pY2 = floatround(pY, floatround_round); pZ2 = floatround(pZ, floatround_round); fX2 = floatround(fX, floatround_round); fY2 = floatround(fY, floatround_round); fZ2 = floatround(fZ, floatround_round); if(fX2 < 0 && pX2 > 0) { fX2 = fX2 * -1; } if(fX2 > 0 && pX2 < 0) { fX2 = fX2 * -1; } if(fY2 < 0 && pY2 > 0) { fY2 = fY2 * -1; } if(fY2 > 0 && pY2 < 0) { fY2 = fY2 * -1; } if(fZ2 < 0 && pZ2 > 0) { fZ2 = fZ2 * -1; } if(fZ2 > 0 && pZ2 < 0) { fZ2 = fZ2 * -1; } if((pY2 - fY2) < 5 && (pZ2 - fZ2) < 5 &&(pY2 - fY2) > -5 && (pZ2 - fZ2) > -5) { switch(weaponid) { case 22: { minushealth(j, playerid, 2, 22); } case 23: { minushealth(j, playerid, 2, 23); } case 24: { minushealth(j, playerid, 45, 24); } case 25: { minushealth(j, playerid, 10, 25); } case 26: { minushealth(j, playerid, 10, 26); } case 27: { minushealth(j, playerid, 10, 27); } case 28: { minushealth(j, playerid, 5, 28); } case 29: { minushealth(j, playerid, 7, 29); } case 30: { minushealth(j, playerid, 3, 30); } case 31: { minushealth(j, playerid, 6, 31); } case 32: { minushealth(j, playerid, 5, 32); } case 33: { minushealth(j, playerid, 25, 33); } case 34: { minushealth(j, playerid, 40, 34); } case 38: { minushealth(j, playerid, 50, 38); } } } } } }}} return 1;}minushealth(playerid, killerid, Float: amount, reason){new Float: health;new Float: armour;GetPlayerHealth(playerid, health);GetPlayerArmour(playerid, armour);if(armour >= amount){SetPlayerArmour(playerid, armour-amount);}else if(armour > 0 && armour < amount){amount = amount - armour;SetPlayerArmour(playerid, 0);SetPlayerHealth(playerid, health - amount);}else if(armour < 1){SetPlayerHealth(playerid, health - amount);}else if(health < amount){SendDeathMessage(killerid, playerid, reason);}return 1;}