Maybe I can give you a simple example. (but I'm mostly generalized to levels)
Okay lets say we want to create a door correct?
I'm going to piece it together.
PHP Code:
//#CLIENTSIDE
function onCreated()
{
this.setShape(1, 32, 32);
this.setImg("block.png");
}
This is basically creating the door and setting the image there.
Now, to make the door dissappear when you say "open" this is what you'll have to do:
PHP Code:
function onPlayerChats()
{
if (player.chat == "open")
{
hide();
}
}
I'm not much of a scripter, but that pretty much shows examples of what different stuff does.