Here you go, just customize it from here:
PHP Code:
function onPlayerChats()
{
if (player.chat == "open")
{
dontBlock();
this.chat = "Open";
scheduleEvent(2, "BlockEntry", "");
}
}
function onBlockEntry()
{
blockAgain();
this.chat = "Closed";
scheduleEvent(2, "ClearChat", "");
}
function onClearChat()
{
this.chat = "";
}
//#CLIENTSIDE
function onCreated()
{
this.chat = "";
setshape(1, 32, 32);
}