ID:158836
 
Is there any way to immediately disble all verbs for the user without using verbs -= typesof(/mob)?
Disable? Yes.

To disable them, just put in a check at the start of each verb that checks to see if it's disabled, and, if so, doesn't execute the verb.

/mob/verb/Say(T as text)
if(usr.thisisdisabled==0)
world << T //An example

Removing the verbs is an entirely different manner, but with the way you phrased the question, it's as if you don't want to remove them, but to "disable" Them, so the above will fulfill that.
the shortest way to disable something would be like this
mob/verb/Tackle()
if(usr.cantattack) return//this would be the equivilant of if(usr.cantattack==1), if(!usr.cantattack) is the same as if(usr.cantattack==0) but more efficiant since it checks all types of null
for(var/mob/M in oview(1))
M.hp-=dmg
view(3)<<"[usr] tackled [m]!"
In response to Mista-mage123
Use Boolean logic in cases like this, silly ;)

// if the var is set to null or "", since it's not ==0 it'll pass the check.

mob/verb/Say(T as text)
if(!usr.thisisdisabled)
world << T //An example
In response to Ruben7
You forgot the "else" of that if statement. my post would be the easiest/shortest because even though its an if, the way its coded, it doesnt need an else.
In response to Tatenen
No, I didn't. It automatically returns null if nothing is defined. My post is basically what you said, I was just pointing that out to Mista.
In response to Tatenen
I would say that using return instead of a properly-formatted if() statement is neither easier nor shorter. It obfuscates the flow and while I don't buy into the "only one procedure exit point" school of thought, I wouldn't throw return all over the place without a good reason to.