Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name Radio
- @inputs
- @outputs C CD
- @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
- @trigger
- interval(10)
- Ls=owner():lastSaid()
- if (first()){
- hint("Player jumper by Senny",100)
- printColor(vec(255,255,0),"Hi, "+owner():name()+".")
- printColor(vec(0,155,255),"Press toggle mouse2 to jump. WASD - control")
- printColor(vec(0,155,255),"Press toggle mouse1 to break.")
- printColor(vec(255,155,0),"Type !cmds1 in chat to view all comands")
- S=1
- E=1
- Const_jump=
- Const_forward=600
- Const_right=8
- FPS=1
- Const_pitch=100
- SP=0
- Const_divisor_pitch=50
- FootStep="garrysmod/content_downloaded.wav" #My favorite /player/footsteps/boomer/walk/concrete1.wav#
- CD=1
- }
- KeyW=keyPress("W")
- KeyS=keyPress("S")
- KeyA=keyPress("A")
- KeyD=keyPress("D")
- entity():propNotSolid(1)
- entity():setAlpha(0)
- owner():setHealth(100)
- if (Ls=="!t1"){
- printColor(vec(255,255,0),"Toggle on!")
- T=1
- concmd("clear")
- }
- if (Ls=="!t0"){
- printColor(vec(255,255,0),"Toggle off!")
- T=0
- concmd("clear")
- }
- if (Ls=="!s1"){
- printColor(vec(255,255,0),"Sound on!")
- S=1
- concmd("clear")
- }
- if (Ls=="!s0"){
- printColor(vec(255,255,0),"Sound off!")
- S=0
- concmd("clear")
- }
- if (Ls=="!j1"){
- Jp=1
- }
- if (Ls=="!j0"){
- Jp=0
- }
- if (Ls=="!i1"){
- I=1
- }
- if (Ls=="!i0"){
- I=0
- }
- if (Ls=="!e1"){
- printColor(vec(255,255,0),"Effects on!")
- E=1
- concmd("clear")
- }
- if (Ls=="!e0"){
- printColor(vec(255,255,0),"Effects off!")
- E=0
- }
- if (Ls=="!f1"){
- Fd=1
- }
- if (Ls=="!f0"){
- Fd=0
- }
- if (Ls=="!r1"){
- Rt=1
- }
- if (Ls=="!r0"){
- Rt=0
- }
- if (Ls=="!cmds1"){
- CMD=1
- }
- if (Ls=="!cmds0"){
- CMD=0
- }
- if (Ls=="!fps1"){
- FPS=1
- }
- if (Ls=="!fps0"){
- FPS=0
- }
- if (Ls=="!sp1"){
- SP=1
- printColor(vec(255,255,0),"Sound pitch on!")
- concmd("clear")
- }
- if (Ls=="!sp0"){
- SP=0
- printColor(vec(255,255,0),"Sound pitch off!")
- concmd("clear")
- }
- if (Ls=="!p1"){
- P=1
- }
- if (Ls=="!p0"){
- P=0
- }
- if (Ls=="!pd1"){
- PD=1
- }
- if (Ls=="!pd0"){
- PD=0
- }
- if (Ls=="!fp1"){
- FP=1
- }
- if (Ls=="!fp0"){
- FP=0
- }
- if (Jp==1){
- Const_jump=Ls:toNumber()
- printColor(vec(255,255,0),"Const_jump=",Const_jump," (Def.300)")
- concmd("clear")
- }
- else{}
- if (Fd==1){
- Const_forward=Ls:toNumber()
- printColor(vec(255,255,0),"Const_forward=",Const_forward," (Def.10)")
- concmd("clear")
- }
- else{}
- if (Rt==1){
- Const_right=Ls:toNumber()
- printColor(vec(255,255,0),"Const_right=",Const_right," (Def.8)")
- concmd("clear")
- }
- else{}
- if (P==1){
- Const_pitch=Ls:toNumber()
- printColor(vec(255,255,0),"Const_pitch=",Const_pitch," (Def.100)")
- concmd("clear")
- }else{}
- if (PD==1){
- Const_divisor_pitch=Ls:toNumber()
- printColor(vec(255,255,0),"Const_divisor_pitch=",Const_divisor_pitch," (Def.50)")
- concmd("clear")
- }else{}
- if (FP==1){
- FootStep=Ls
- printColor(vec(255,255,0),"FootStep:string=",FootStep)
- concmd("clear")
- }else{}
- if (owner():keyAttack2()){
- if (owner():isOnGround()){
- if (E==1){
- effectSpawn("VortDispel",owner():pos(),10)
- }
- owner():setVel(vec(0,0,Const_jump))
- if (S==1){
- }else{}
- interval(200)
- }
- }else{
- if (KeyW){
- owner():setVel(owner():forward()*Const_forward)
- }
- if (KeyS){
- owner():setVel(-owner():forward()*Const_forward)
- }
- if (KeyA){
- owner():setVel(-owner():right()*Const_right)
- }
- if (KeyD){
- owner():setVel(owner():right()*Const_right)
- }
- }
- if (owner():isUnderWater()){
- effectSpawn("VortDispel",owner():pos(),10)
- owner():setVel(vec(0,0,90))
- }
- if (owner():keyAttack1()){
- owner():setVel(vec(0,0,-Const_jump/30))
- }
- if (T==1){
- if (owner():keyAttack1()==0){
- if (owner():isOnGround()){
- if (E==1){
- effectSpawn("VortDispel",owner():pos(),10)
- }
- owner():setVel(vec(0,0,Const_jump))
- }
- interval(200)
- }else{
- if (KeyW){
- owner():setVel(owner():forward()*Const_forward)
- }
- if (KeyS){
- owner():setVel(-owner():forward()*Const_forward)
- }
- if (KeyA){
- owner():setVel(-owner():right()*Const_right)
- }
- if (KeyD){
- owner():setVel(owner():right()*Const_right)
- }
- }
- if (owner():isUnderWater()){
- effectSpawn("VortDispel",owner():pos(),10)
- owner():setVel(vec(0,0,90))
- }
- }
- elseif(T==0){}
- function void info(){
- if (owner():isOnGround()==0){
- C++
- }
- else{C=0}
- print("\nJump:",C)
- print("\nSpeed:",owner():vel():x()+owner():vel():y())
- concmd("clear")
- }
- if (I==1){
- info()
- }
- else{}
- if (CMD==1){
- if (CD==1){
- concmd("clear")
- concmd("showconsole")
- concmd("echo ###############################################################################")
- concmd("echo #_____________:Player Jumper commands:______________")
- concmd("echo #")
- concmd("echo #1 !j1 - start set jump force, !j0 end set force.")
- concmd("echo #2 !f1 - start set forward\back force, !f0 end set force.")
- concmd("echo #3 !r1 - start set right\left force, !r0 end set force.")
- concmd("echo #4 !t1 - to on toggle jump, end !t1 to off")
- concmd("echo #5 !s0 - to off sound, end !s1 to on")
- concmd("echo #6 !e0 - to off effects, end !e1 to on")
- concmd("echo #7 !i1 - to view info, end !i1 to close view info")
- concmd("echo #8 !fps0 - to on thirdperson, end !fps1 to on firstperson.")
- concmd("echo #9 !sp1 - to on SoundPitch effect, end !sp0 to off this effect.")
- concmd("echo #10 !p1 - to set pitch constant, end !p0 to end set const value.")
- concmd("echo #11 !pd1 - to set pitch div_constant, end !pd0 to end set div_constant value.")
- concmd("echo #12 !fp1 - to set FootStep sound, end !pd0 to end FootStep sound.")
- concmd("echo #")
- concmd("echo ###############################################################################")
- CD++
- }
- }else{
- CD=1
- }
- #work on cvar "wire_expression2_concmd 1"
- if (FPS==1){
- concmd("firstperson")
- }else{}
- if (FPS==0){
- concmd("thirdperson")
- }else{}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement