Help - stun command does not work

jererosas15

New Member
Sep 18, 2016
24
2
Hi,
I have a problem with the police, you can not paralyze users

I have tried using the command: stun of all forms and nothing works,
It does not give a fault message either

I have this code


To be able to handcuff someone, I have to use the command: freeze and then: cuff x
 

JayC

Always Learning
Aug 8, 2013
5,493
1,398
Can you verify that the cooldown for "stun" is not triggering false? That if statement just returns with no whisper. Wrap that in a if and say like "You need to cooldown...."
 
I continued reading and this whole class needs to be recoded. Very sloppy code and does not do the job efficiently. You aren't freezing the user anywhere in the code either. Are you sure Session.Shout is set to speak(Usually called Shout composer)?
 

Mikee

Active Member
Jul 8, 2017
162
102
also this is a weird command to begin with imo. Its checking params[0] saying that it can be either stun or spray. But it has to be either one or the other as only one of them is what calls that command to even run. unless in commandmanager ur calling the class as both

this.register("stun", new StunCommand());
this.register("spray", new StunCommand());
 

JayC

Always Learning
Aug 8, 2013
5,493
1,398
also this is a weird command to begin with imo. Its checking params[0] saying that it can be either stun or spray. But it has to be either one or the other as only one of them is what calls that command to even run. unless in commandmanager ur calling the class as both

this.register("stun", new StunCommand());
this.register("spray", new StunCommand());
The difference between stun and spray is it's checking to say which chat... Which is fine however just the amount of code in this is ridiculous and the structure is horrible
 

Users who are viewing this thread

Top