You can store values in this.attr[] values, like so.
For example purposes:
PHP Code:
function onCreated() {
// Put a value in an attribute
this.attr[2] = "test!";
}
//#CLIENTSIDE
function onPlayerEnters() {
// Would set the NPC text to "test!"
this.chat = this.attr[2];
}
You can alter the variables on the clientside, but changes will remain clientside, and will be overwritten/updated if changed on the serverside.