Advertisement
wifiboost

Untitled

Feb 23rd, 2018
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.52 KB | None | 0 0
  1. @name Radio
  2. @inputs
  3. @outputs C CD
  4. @persist T S Jp Fd Rt Const_jump Const_forward Const_right G I E FPS Const_pitch SP P Const_divisor_pitch PD FootStep:string FP
  5. @trigger
  6. interval(10)
  7. Ls=owner():lastSaid()
  8. if (first()){
  9. hint("Player jumper by Senny",100)
  10. printColor(vec(255,255,0),"Hi, "+owner():name()+".")
  11. printColor(vec(0,155,255),"Press toggle mouse2 to jump. WASD - control")
  12. printColor(vec(0,155,255),"Press toggle mouse1 to break.")
  13. printColor(vec(255,155,0),"Type !cmds1 in chat to view all comands")
  14. S=1
  15. E=1
  16. Const_jump=
  17. Const_forward=600
  18. Const_right=8
  19. FPS=1
  20. Const_pitch=100
  21. SP=0
  22. Const_divisor_pitch=50
  23. FootStep="garrysmod/content_downloaded.wav" #My favorite /player/footsteps/boomer/walk/concrete1.wav#
  24. CD=1
  25. }
  26. KeyW=keyPress("W")
  27. KeyS=keyPress("S")
  28. KeyA=keyPress("A")
  29. KeyD=keyPress("D")
  30. entity():propNotSolid(1)
  31. entity():setAlpha(0)
  32. owner():setHealth(100)
  33.  
  34. if (Ls=="!t1"){
  35. printColor(vec(255,255,0),"Toggle on!")
  36. T=1
  37. concmd("clear")
  38. }
  39. if (Ls=="!t0"){
  40. printColor(vec(255,255,0),"Toggle off!")
  41. T=0
  42. concmd("clear")
  43. }
  44. if (Ls=="!s1"){
  45. printColor(vec(255,255,0),"Sound on!")
  46. S=1
  47. concmd("clear")
  48. }
  49. if (Ls=="!s0"){
  50. printColor(vec(255,255,0),"Sound off!")
  51. S=0
  52. concmd("clear")
  53. }
  54. if (Ls=="!j1"){
  55. Jp=1
  56. }
  57. if (Ls=="!j0"){
  58. Jp=0
  59. }
  60. if (Ls=="!i1"){
  61. I=1
  62. }
  63. if (Ls=="!i0"){
  64. I=0
  65. }
  66. if (Ls=="!e1"){
  67. printColor(vec(255,255,0),"Effects on!")
  68. E=1
  69. concmd("clear")
  70. }
  71. if (Ls=="!e0"){
  72. printColor(vec(255,255,0),"Effects off!")
  73. E=0
  74. }
  75. if (Ls=="!f1"){
  76. Fd=1
  77. }
  78. if (Ls=="!f0"){
  79. Fd=0
  80. }
  81. if (Ls=="!r1"){
  82. Rt=1
  83. }
  84. if (Ls=="!r0"){
  85. Rt=0
  86. }
  87. if (Ls=="!cmds1"){
  88. CMD=1
  89. }
  90. if (Ls=="!cmds0"){
  91. CMD=0
  92. }
  93. if (Ls=="!fps1"){
  94. FPS=1
  95. }
  96. if (Ls=="!fps0"){
  97. FPS=0
  98. }
  99. if (Ls=="!sp1"){
  100. SP=1
  101. printColor(vec(255,255,0),"Sound pitch on!")
  102. concmd("clear")
  103. }
  104. if (Ls=="!sp0"){
  105. SP=0
  106. printColor(vec(255,255,0),"Sound pitch off!")
  107. concmd("clear")
  108. }
  109. if (Ls=="!p1"){
  110. P=1
  111. }
  112. if (Ls=="!p0"){
  113. P=0
  114. }
  115. if (Ls=="!pd1"){
  116. PD=1
  117. }
  118. if (Ls=="!pd0"){
  119. PD=0
  120. }
  121. if (Ls=="!fp1"){
  122. FP=1
  123. }
  124. if (Ls=="!fp0"){
  125. FP=0
  126. }
  127.  
  128. if (Jp==1){
  129. Const_jump=Ls:toNumber()
  130. printColor(vec(255,255,0),"Const_jump=",Const_jump," (Def.300)")
  131. concmd("clear")
  132. }
  133. else{}
  134. if (Fd==1){
  135. Const_forward=Ls:toNumber()
  136. printColor(vec(255,255,0),"Const_forward=",Const_forward," (Def.10)")
  137. concmd("clear")
  138. }
  139. else{}
  140. if (Rt==1){
  141. Const_right=Ls:toNumber()
  142. printColor(vec(255,255,0),"Const_right=",Const_right," (Def.8)")
  143. concmd("clear")
  144. }
  145. else{}
  146.  
  147. if (P==1){
  148. Const_pitch=Ls:toNumber()
  149. printColor(vec(255,255,0),"Const_pitch=",Const_pitch," (Def.100)")
  150. concmd("clear")
  151. }else{}
  152. if (PD==1){
  153. Const_divisor_pitch=Ls:toNumber()
  154. printColor(vec(255,255,0),"Const_divisor_pitch=",Const_divisor_pitch," (Def.50)")
  155. concmd("clear")
  156. }else{}
  157. if (FP==1){
  158. FootStep=Ls
  159. printColor(vec(255,255,0),"FootStep:string=",FootStep)
  160. concmd("clear")
  161. }else{}
  162.  
  163. if (owner():keyAttack2()){
  164. if (owner():isOnGround()){
  165. if (E==1){
  166. effectSpawn("VortDispel",owner():pos(),10)
  167. }
  168. owner():setVel(vec(0,0,Const_jump))
  169. if (S==1){
  170. }else{}
  171. interval(200)
  172. }
  173. }else{
  174. if (KeyW){
  175. owner():setVel(owner():forward()*Const_forward)
  176. }
  177. if (KeyS){
  178. owner():setVel(-owner():forward()*Const_forward)
  179. }
  180. if (KeyA){
  181. owner():setVel(-owner():right()*Const_right)
  182. }
  183. if (KeyD){
  184. owner():setVel(owner():right()*Const_right)
  185. }
  186. }
  187. if (owner():isUnderWater()){
  188. effectSpawn("VortDispel",owner():pos(),10)
  189. owner():setVel(vec(0,0,90))
  190. }
  191.  
  192.  
  193.  
  194. if (owner():keyAttack1()){
  195. owner():setVel(vec(0,0,-Const_jump/30))
  196. }
  197.  
  198. if (T==1){
  199. if (owner():keyAttack1()==0){
  200. if (owner():isOnGround()){
  201. if (E==1){
  202. effectSpawn("VortDispel",owner():pos(),10)
  203. }
  204. owner():setVel(vec(0,0,Const_jump))
  205.  
  206. }
  207. interval(200)
  208. }else{
  209. if (KeyW){
  210. owner():setVel(owner():forward()*Const_forward)
  211. }
  212. if (KeyS){
  213. owner():setVel(-owner():forward()*Const_forward)
  214. }
  215. if (KeyA){
  216. owner():setVel(-owner():right()*Const_right)
  217. }
  218. if (KeyD){
  219. owner():setVel(owner():right()*Const_right)
  220. }
  221. }
  222. if (owner():isUnderWater()){
  223. effectSpawn("VortDispel",owner():pos(),10)
  224. owner():setVel(vec(0,0,90))
  225. }
  226. }
  227. elseif(T==0){}
  228.  
  229.  
  230.  
  231. function void info(){
  232. if (owner():isOnGround()==0){
  233. C++
  234. }
  235. else{C=0}
  236. print("\nJump:",C)
  237. print("\nSpeed:",owner():vel():x()+owner():vel():y())
  238. concmd("clear")
  239. }
  240.  
  241.  
  242. if (I==1){
  243. info()
  244. }
  245. else{}
  246.  
  247. if (CMD==1){
  248. if (CD==1){
  249. concmd("clear")
  250. concmd("showconsole")
  251. concmd("echo ###############################################################################")
  252. concmd("echo #_____________:Player Jumper commands:______________")
  253. concmd("echo #")
  254. concmd("echo #1 !j1 - start set jump force, !j0 end set force.")
  255. concmd("echo #2 !f1 - start set forward\back force, !f0 end set force.")
  256. concmd("echo #3 !r1 - start set right\left force, !r0 end set force.")
  257. concmd("echo #4 !t1 - to on toggle jump, end !t1 to off")
  258. concmd("echo #5 !s0 - to off sound, end !s1 to on")
  259. concmd("echo #6 !e0 - to off effects, end !e1 to on")
  260. concmd("echo #7 !i1 - to view info, end !i1 to close view info")
  261. concmd("echo #8 !fps0 - to on thirdperson, end !fps1 to on firstperson.")
  262. concmd("echo #9 !sp1 - to on SoundPitch effect, end !sp0 to off this effect.")
  263. concmd("echo #10 !p1 - to set pitch constant, end !p0 to end set const value.")
  264. concmd("echo #11 !pd1 - to set pitch div_constant, end !pd0 to end set div_constant value.")
  265. concmd("echo #12 !fp1 - to set FootStep sound, end !pd0 to end FootStep sound.")
  266. concmd("echo #")
  267. concmd("echo ###############################################################################")
  268. CD++
  269. }
  270. }else{
  271. CD=1
  272. }
  273. #work on cvar "wire_expression2_concmd 1"
  274. if (FPS==1){
  275. concmd("firstperson")
  276. }else{}
  277. if (FPS==0){
  278. concmd("thirdperson")
  279. }else{}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement