Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define FILTERSCRIPT
- #define DAMAGE_COLT 20
- #define DAMAGE_SILENCED 20
- #define DAMAGE_DEAGLE 40
- #define DAMAGE_SHOTGUN 70
- #define DAMAGE_SAWNOFF 50
- #define DAMAGE_UZI 18
- #define DAMAGE_MP5 18
- #define DAMAGE_AK47 20
- #define DAMAGE_RIFLE 45
- #define DAMAGE_TEC9 18
- #define DAMAGE_M4 20
- #define DAMAGE_SNIPER 50
- #include <a_samp>
- #if defined FILTERSCRIPT
- public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
- }
- new damage = 0;
- switch(weaponid)
- {
- case 22: damage = DAMAGE_COLT;
- case 23: damage = DAMAGE_SILENCER;
- case 24: damage = DAMAGE_DEAGLE;
- case 25: damage = DAMAGE_SHOTGUN;
- case 26: damage = DAMAGE_SAWNOFF;
- case 28: damage = DAMAGE_UZI;
- case 29: damage = DAMAGE_MP5;
- case 30: damage = DAMAGE_AK47;
- case 31: damage = DAMAGE_M4;
- case 32: damage = DAMAGE_TEC9;
- case 33: damage = DAMAGE_RIFLE;
- case 34: damage = DAMAGE_SNIPER;
- }
- if(damage != 0 && !IsPlayerInRangeOfPoint(issuerid,distance,x,y,z))
- {
- if(armour > 0)
- {
- amount = armour - damage;
- if(amount < 0) return SetPlayerHealth(playerid,health-damage);
- return SetPlayerArmour(playerid,armour-damage);
- }
- else return SetPlayerHealth(playerid,health-damage);
- }
- return 1;
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement