It seems that if you have the onPlayerChats() event in a script and an onTimeout() event, there is a slight delay when the function is called. It might be just me, but I'm not sure, so I decided to post it here.
If you have just the following below, the player's chat will be set to "" just fine without any delay.
PHP Code:
function onPlayerChats()
{
if (player.chat == "/test")
{
player.chat = "";
}
}
However, if you have this:
PHP Code:
function onCreated()
{
setTimer(.05);
}
function onTimeout()
{
//doesn't even need code here
setTimer(.05);
}
function onPlayerChats()
{
if (player.chat == "/test")
{
player.chat = "";
}
}
The above code will have a slight delay for onPlayerChats() to be called.
Well, there is a workaround for this by just putting the onPlayerChats event into a different WNPC, however i'd still like this fixed.