I need some help with a script I am working on. The guns swap fine but the new gun doesnt show when the switch happens. I have to press 1 or mouse wheel to bring it up.
:state=0,plrdistwithin=40,scancodekeypressed=18:state=1
:state=1:removeweap=1,state=2
:state=2:giveweap=eai\g36c,showplrgun,state=3
:state=3:state=0
Edit I am also having trouble with a script that slows the players speed as his health decreases.
The players speed will go down, but if I pick up a health after getting hurt, and my health goes all the way up, the speed stays the same as before the health pickup. Ive tried it multiple ways.
;Artificial Intelligence Script
;Header
desc =Plr Speed Decreases as Health Drains
;Triggers
:state=0,plrhealthgreater=231:plrspeed=80,state=1
:state=1,plrhealthless=230:plrspeed=75,state=2
:state=2,plrhealthless=210:plrspeed=70,state=3
:state=3,plrhealthless=190:plrspeed=65,state=4
:state=4,plrhealthless=170:plrspeed=60,state=5
:state=5,plrhealthless=150:plrspeed=55,state=6
:state=6,plrhealthless=130:plrspeed=50,state=7
:state=7,plrhealthless=110:plrspeed=45,state=8
:state=8,plrhealthless=90:plrspeed=40,state=9
:state=9,plrhealthless=70:plrspeed=35,state=10
:state=10,plrhealthless=50:plrspeed=30,state=11
:state=11,plrhealthless=30:plrspeed=20,state=12
:state=12,plrhealthless=10:plrspeed=10,state=13
:state=13:state=0
;Artificial Intelligence Script
;Header
desc =Plr Speed Decreases as Health Drains
;Triggers
:state=0,plrhealthless=230:plrspeed=75,state=1
:state=1,plrhealthless=210:plrspeed=70,state=2
:state=2,plrhealthless=190:plrspeed=65,state=3
:state=3,plrhealthless=170:plrspeed=60,state=4
:state=4,plrhealthless=150:plrspeed=55,state=5
:state=5,plrhealthless=130:plrspeed=50,state=6
:state=6,plrhealthless=110:plrspeed=45,state=7
:state=7,plrhealthless=90:plrspeed=40,state=8
:state=8,plrhealthless=70:plrspeed=35,state=9
:state=9,plrhealthless=50:plrspeed=30,state=10
:state=10,plrhealthless=30:plrspeed=20,state=11
:state=11,plrhealthless=10:plrspeed=10,state=12
:state=12,plrhealthgreater=11:plrspeed=20,state=13
:state=13,plrhealthgreater=31:plrspeed=30,state=14
:state=14,plrhealthgreater=51:plrspeed=35,state=15
:state=15,plrhealthgreater=71:plrspeed=40,state=16
:state=16,plrhealthgreater=91:plrspeed=45,state=17
:state=17,plrhealthgreater=111:plrspeed=50,state=18
:state=18,plrhealthgreater=131:plrspeed=55,state=19
:state=19,plrhealthgreater=151:plrspeed=60,state=20
:state=20,plrhealthgreater=171:plrspeed=65,state=21
:state=21,plrhealthgreater=191:plrspeed=70,state=22
:state=22,plrhealthgreater=211:plrspeed=75,state=23
:state=23,plrhealthgreater=231:plrspeed=80
If a mod stops by please change the thread title to "Help with weapon switch and health script"
I recently learned to sleep with my eyes open. ..... God am I tired