Advertisement
D00D64

Untitled

Apr 19th, 2014
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.89 KB | None | 0 0
  1. local function h(v, p)
  2.  
  3. local ico_pistol = v.cachePatch("WUSPA0")
  4. local ico_shotty = v.cachePatch("STPNA0")
  5. local ico_nailgun = v.cachePatch("PCSPA0")
  6.  
  7.  
  8. for player in players.iterate
  9. v.drawNum(50, 76, player.heart);
  10. v.drawNum(300, 30, player.weaponorder);
  11. if player.weaponorder == 0
  12. v.drawString(300, 16, "Fist", V_ALLOWLOWERCASE,"right");
  13. end
  14. if player.weaponorder == 1
  15. v.drawNum(300, 172, player.autoammo);
  16. v.drawNum(250, 172, player.pistolclip);
  17. v.draw(270, 170, ico_pistol);
  18. v.drawString(300, 16, "Pistol", V_ALLOWLOWERCASE,"right");
  19. v.drawString(300, 184, "Auto", V_ALLOWLOWERCASE,"right");
  20. end
  21. if player.weaponorder == 2
  22. v.drawNum(300, 172, player.scatterammo);
  23. v.drawNum(250, 172, player.shottyclip);
  24. v.draw(270, 170, ico_shotty);
  25. v.drawString(300, 16, "Shotgun", V_ALLOWLOWERCASE,"right");
  26. v.drawString(300, 184, "Scatter", V_ALLOWLOWERCASE,"right");
  27. end
  28. if player.weaponorder == 3
  29. v.drawNum(300, 172, player.autoammo);
  30. v.drawNum(250, 172, player.nailclip);
  31. v.draw(270, 170, ico_nailgun);
  32. v.drawString(300, 16, "Nailgun", V_ALLOWLOWERCASE,"right");
  33. v.drawString(300, 184, "Auto", V_ALLOWLOWERCASE,"right");
  34. end
  35. end
  36. end
  37.  
  38. local animatedelay = 0
  39. local animatedelaytwo = 0
  40.  
  41. local function wep(v, p)
  42.  
  43. if animatedelay > 0
  44. animatedelay = $1-1
  45. end
  46. if animatedelaytwo > 0
  47. animatedelaytwo = $1-1
  48. end
  49.  
  50. if player.fistswung >= 1
  51. animatedelay = 16
  52. end
  53. if player.pistolfired >= 1
  54. animatedelay = 16
  55. end
  56. if player.shottyfired >= 1
  57. animatedelay = 28
  58. end
  59. if player.nailfired >= 1
  60. animatedelay = 4
  61. end
  62.  
  63. if player.pistolreload >= 1
  64. animatedelaytwo = 32
  65. end
  66. if player.shottyreload >= 1
  67. animatedelaytwo = 14
  68. end
  69. if player.nailreload >= 1
  70. animatedelaytwo = 46
  71. end
  72.  
  73. if player.weaponorder == 0
  74.  
  75. fist_ready = v.cachePatch("PUNGA0")
  76. fist_swing1 = v.cachePatch("PUNGB0")
  77. fist_swing2 = v.cachePatch("PUNGC0")
  78. fist_swing3 = v.cachePatch("PUNGD0")
  79.  
  80. if animatedelay == 0
  81. v.draw(0, 0, fist_ready);
  82. elseif animatedelay >= 16
  83. v.draw(0, 0, fist_swing1);
  84. elseif animatedelay >= 12
  85. v.draw(0, 0, fist_swing2);
  86. elseif animatedelay >= 8
  87. v.draw(0, 0, fist_swing3);
  88. elseif animatedelay >= 4
  89. v.draw(0, 0, fist_swing2);
  90. elseif animatedelay >= 1
  91. v.draw(0, 0, fist_swing1);
  92. end
  93. end
  94.  
  95. if player.weaponorder == 1
  96.  
  97. pistol_ready = v.cachePatch("WUSSA0")
  98. pistol_flash = v.cachePatch("WUSFA0")
  99. pistol_shoot1 = v.cachePatch("WUSSB0")
  100. pistol_shoot2 = v.cachePatch("WUSSC0")
  101. pistol_shoot3 = v.cachePatch("WUSSD0")
  102. pistol_shoot4 = v.cachePatch("WUSSE0")
  103. pistol_reload1 = v.cachePatch("WUSSF0")
  104. pistol_reload2 = v.cachePatch("WUSSG0")
  105. pistol_reload3 = v.cachePatch("WUSSH0")
  106. pistol_reload4 = v.cachePatch("WUSSI0")
  107.  
  108. if animatedelay == 0
  109. and animatedelaytwo == 0
  110. v.draw(0, 0, pistol_ready);
  111. elseif animatedelay >= 16
  112. v.draw(0, 0, pistol_shoot1);
  113. v.draw(0, 0, pistol_flash);
  114. elseif animatedelay >= 14
  115. v.draw(0, 0, pistol_shoot2);
  116. elseif animatedelay >= 12
  117. v.draw(0, 0, pistol_shoot3);
  118. elseif animatedelay >= 10
  119. v.draw(0, 0, pistol_shoot4);
  120. elseif animatedelay >= 8
  121. v.draw(0, 0, pistol_shoot3);
  122. elseif animatedelay >= 6
  123. v.draw(0, 0, pistol_shoot2);
  124. elseif animatedelay >= 4
  125. v.draw(0, 0, pistol_shoot1);
  126. elseif animatedelay >= 1
  127. v.draw(0, 0, pistol_ready);
  128. end
  129.  
  130. if animatedelaytwo >= 32
  131. and animatedelay == 0
  132. v.draw(0, 0, pistol_ready);
  133. elseif animatedelaytwo >= 31
  134. v.draw(0, 0, pistol_reload1);
  135. elseif animatedelaytwo >= 28
  136. v.draw(0, 0, pistol_reload2);
  137. elseif animatedelaytwo >= 26
  138. v.draw(0, 0, pistol_reload3);
  139. elseif animatedelaytwo >= 24
  140. v.draw(0, 0, pistol_reload4);
  141. elseif animatedelaytwo >= 22
  142. v.draw(0, 0, pistol_reload4);
  143. elseif animatedelaytwo >= 6
  144. v.draw(0, 0, pistol_reload3);
  145. elseif animatedelaytwo >= 4
  146. v.draw(0, 0, pistol_reload2);
  147. elseif animatedelaytwo >= 1
  148. v.draw(0, 0, pistol_ready);
  149. end
  150. end
  151.  
  152. if player.weaponorder == 2
  153.  
  154. shotty_ready = v.cachePatch("STGNA0")
  155. shotty_reload1 = v.cachePatch("STGNB0")
  156. shotty_reload2 = v.cachePatch("STGNC0")
  157. shotty_reload3 = v.cachePatch("STGND0")
  158. shotty_reload4 = v.cachePatch("STGNE0")
  159. shotty_reload5 = v.cachePatch("STGNF0")
  160. shotty_shoot1 = v.cachePatch("STGNG0")
  161. shotty_shoot2 = v.cachePatch("STGNH0")
  162. shotty_shoot3 = v.cachePatch("STGNI0")
  163. shotty_flash = v.cachePatch("STFNA0")
  164.  
  165. if animatedelay == 0
  166. and animatedelaytwo == 0
  167. v.draw(0, 0, shotty_ready);
  168. elseif animatedelay >= 28
  169. v.draw(0, 0, shotty_ready);
  170. v.draw(0, 0, shotty_flash);
  171. elseif animatedelay >= 26
  172. v.draw(0, 0, shotty_shoot1);
  173. elseif animatedelay >= 22
  174. v.draw(0, 0, shotty_shoot2);
  175. elseif animatedelay >= 18
  176. v.draw(0, 0, shotty_shoot3);
  177. elseif animatedelay >= 14
  178. v.draw(0, 0, shotty_shoot2);
  179. elseif animatedelay >= 12
  180. v.draw(0, 0, shotty_shoot1);
  181. end
  182.  
  183. end
  184.  
  185. if player.weaponorder == 3
  186.  
  187. nail_ready = v.cachePatch("PCGNA0")
  188. nail_fire1 = v.cachePatch("PCGNB0")
  189. nail_fire2 = v.cachePatch("PCGNC0")
  190. nail_reload1 = v.cachePatch("PCGND0")
  191. nail_reload2 = v.cachePatch("PCGNE0")
  192. nail_flash1 = v.cachePatch("PCGFA0")
  193. nail_flash2 = v.cachePatch("PCGFB0")
  194.  
  195. if animatedelay == 0
  196. and animatedelaytwo == 0
  197. v.draw(0, 0, nail_ready);
  198. elseif animatedelay >= 2
  199. v.draw(0, 0, nail_fire1);
  200. v.draw(0, 0, nail_flash1);
  201. elseif animatedelay >= 1
  202. v.draw(0, 0, nail_fire2);
  203. v.draw(0, 0, nail_flash2);
  204.  
  205. elseif animatedelaytwo >= 44
  206. v.draw(0, 0, nail_reload1);
  207. elseif animatedelaytwo >= 3
  208. v.draw(0, 0, nail_reload2);
  209. elseif animatedelaytwo >= 1
  210. v.draw(0, 0, nail_reload1);
  211. end
  212.  
  213. end
  214.  
  215.  
  216. end
  217.  
  218. hud.add(h, "game")
  219. hud.add(wep, "game")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement