I tried rebuilding something better:
PHP Code:
//#CLIENTSIDE
function onCreated()
{
for (j: players) {
if ( mousex in | j.x + 0.5, j.x + 2.5| && mousey in | j.y, j.y + 3|) {
showText( 250, j.x + 1.5, j.y + 3.2, "Comic Sans MS", "cb", j.nick.substring( NULL, min( 30, j.nick.pos( "("))));
changeImgVis( 250, 0);
if ( j.guild != NULL) {
showText( 251, j.x + 1.3, j.y + 4.5, "Comic Sans MS", "cb", "[ " @ j.guild @ " ]");
changeImgVis( 251, 0);
if ( contains( this.staffGuilds, j.guild)) changeImgColors( 251, NULL, 1, NULL, 1);
}
}
}
for ( j: npcs) {
if ( mousex in | j.x + 0.5, j.x + 2.5| && mousey in | j.y, j.y + 3|) {
showText( 250, j.x + 1.5, j.y + 3.2, "Comic Sans MS", "cb", j.nick.substring( NULL, min( 30, j.nick.pos( "("))));
changeImgVis( 250, 0);
if ( j.guild != NULL) {
showText( 251, j.x + 1.3, j.y + 4.5, "Comic Sans MS", "cb", "[ " @ j.guild @ " ]");
changeImgVis( 251, 0);
if ( contains( this.staffGuilds, j.guild)) changeImgColors( 251, NULL, 1, NULL, 1);
}
}
}
}