Guest User

Untitled

a guest
Sep 24th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. bind MOUSE1 [hitmsg; attack]
  2. bind MOUSE2 [hitmsg; altaction]
  3.  
  4. hitmsg = [
  5. nadedmg = 0
  6. if (= (curweapon) 8) [nadedmg = 1] [
  7. bullets = (magcontent (curweapon))
  8. bullets_magres = (magreserve (curweapon))
  9. onrelease [if (= $hits 0) [] [
  10. if (&& (= $shotsf 0) (= (curweapon) 0)) [shotsf = 1] [
  11. if (= $bullets_magres (magreserve (curweapon))) [shotsf = (- $bullets (magcontent (curweapon)))] [shotsf = (+ (- $bullets (magcontent (curweapon))) (- $bullets_magres (magreserve (curweapon))))]]
  12. shotsm = (- $shotsf $hits)
  13. echo (concatword " 1SHOTS: " $shotsf " 3MISSED: " $shotsm " 2HITS: " $hits " 0DAMAGE: " $hitdmg)
  14. ]]]
  15. ]
  16.  
  17. onHit = [
  18. hits = 0; hitdmg = 0
  19. if (= $arg1 (findcn $curname)) [
  20. hitdmg = (+ $hitdmg $arg3); hits = (+ $hits 1)
  21. if $nadedmg [echo "GRENADE DAMAGE: " $hitdmg]
  22. ]]
Add Comment
Please, Sign In to add comment