mob
verb
Say(T as text)
view() << "[src] says: [T]"
admins << "[src] says: [T]"
I am trying to make it if someone said something, it would be sent to the view and admins in case it was something against the rules. How can I do that?
ID:163917
Jul 28 2007, 8:13 am
|
|
I set up a system like this:
mob I am trying to make it if someone said something, it would be sent to the view and admins in case it was something against the rules. How can I do that? |
Okay, here is an example of what you can do. But its not recommended because you will be spammed if your game has a lot of people on.
mob However, this one is recommended. I set up a code you can use for admins so that if they toggle the verb, they can start hearing view chat, and toggling again will deactivate it. You'll have to edit the variables of this code to match your own game. mob/var/toggled If you want, I can help you set up a chat log like Mecha said that only admins can read. Reply to this message telling me if you want me to. |
In response to Learned
|
|
Learned wrote:
However, this one is recommended. I set up a code you can use for admins so that if they toggle the verb, they can start hearing view chat, and toggling again will deactivate it. You'll have to edit the variables of this code to match your own game. > mob/var/toggled If you want, I can help you set up a chat log like Mecha said that only admins can read. Reply to this message telling me if you want me to. The coding is dreadfull for starters you are using usr and your used usr.view() which is totally wrong and why did you define "a" this is an example of what you should do. You also switched the boleen varibles and the on off varible. mob/var/toggled = 0 |
In response to Miran94
|
|
True, youre very right, after reading over it i messed up on usr.view() it should say view(usr). =/ Sorry about that im going to edit my post right now.
but in your code you used src which is unnecessary in verbs, src is more used in procs. usr should be used in verbs as far as i know. and the way you set up the "msg" var is good for starters but as he gets better he might have to build off of the way i put it, so he might as well learn now. |
In response to Learned
|
|
Actually usr should never be used excepect if your call a mob proc on a non mob.
|
In response to Miran94
|
|
Wrong. usr fits just fine in verbs. Where usr should never be used is in procs.
|
Personally, I wouldn't want to be spammed by what the players were saying. If it was inappropiate, other players should tell you or you could just keep a text log.(you can most likely find out how to do on the hub)