ID:148371
 
i have an pepperspray function but if u press it it has to fire on a close(/the closest) mob or something.
how do i do that??
peperspray() //they can pepperspray!!!!
world << "[usr] pepersprays on ???"
Look up orange().

You'll want to simply take the first mob in orange(2,src) and do whatever you need on that.
In response to Alathon
Alathon wrote:
Look up orange().

You'll want to simply take the first mob in orange(2,src) and do whatever you need on that.

???!?!?!?!?!
sorry i don'T understand (I'm dutch)
In response to ShakerDeath
Your problem is that you have no idea how to code, so anything short of a complete piece of code won't help you at all.

I've said it to you twice now, and you still didn't pay any attention to it. You need to read to read some beginners tutorials on the language and possibly the FAQ. The problem is that you don't even understand the very basics of the language, and without understanding even the basics, you can't get anywhere with it.

It's like cars. Continually hitching rides with other people is going to eventually annoy them, and while it might get you where you need to be that once, what happens the next time you need to be somewhere? Learning how to drive will solve your problems, because no longer will you need to rely(as much) on others, you will be able to use it whenever its needed.

Learn the basics of the language before attempting to create a game and specific pieces of code.