wouldn't it be easier to just do a showText using findimg by the player rather than an NPC if your just doing text?
Example:
PHP Code:
function onActionServerside()
{
switch ( params[ 0])
{
case "stampOn":
temp.pl = findPlayer( params[ 1]);
pl.clientr.stamp = params[ 2];
pl.triggerClient( "gui", name, params[ 0]);
break;
case "stampOff":
findPlayer( params[ 1]).clientr.stamp = NULL;
break;
}
}
//#CLIENTSIDE
function onPlayerChats()
{
temp.tokens = player.chat.tokenize();
if ( tokens[ 0] == "/stamp")
triggerServer( "gui", name, "stampOn", tokens[ 1], tokens[ 2]);
else if ( tokens[ 0] == "/removestamp")
triggerServer( "gui", name, "stampOff", tokens[ 1]);
}
function onActionClientside()
{
if ( params[ 0] == "stampOn")
onTimeout();
}
function onTimeout()
{
if ( clientr.stamp != NULL)
{
with ( findImg( this.index)) // Adjust attributes to your liking
{
x = player.x;
y = player.y;
zoom = 0.45;
text = clientr.stamp;
}
setTimer( 0.05);
}
else
setTimer( 0);
}
Here's a Link for those Attributes.
TShowImg