I'm, unfortunately, asking the question on behalf of our coder, so I may not phrase it entirely correct (Apologies in advance!).
We are trying to use the following code to make a particular message display onscreen upon logging in. We think that the if statement is not functioning, or not reading the value as true. Any way to fix the problem?
if ($isloggingin == 1)
{
set("last_login",time());
set("flags",str_replace("(nodeltemp)","",get("flags")));
$action = "/".get("login");
echo "<font color=".get("tcolor").">\n";
print (getfile("rpinfo"));
print nl2br(stripslashes(getfile("login")));
$pcs=explode(":",getfile("online"));
for($i=0;$i<count($pcs);$i++)
{
if(strpos(getuser($pcs[$i],"friends"),$username)!==false&&!(getuser($pcs[$i],"x")==get("x")&&getuser($pcs[$i],"y")==get("y")&&getuser($pcs[$i],"z")==get("z")&&getuser($pcs[$i],"plane")==get("plane")))
setuser($pcs[$i],"chat",getuser($pcs[$i],"chat")."<font class=friends><input type=button class=button onClick=javascript:tellTo('$username') value=*>$username has come online.</font><br>\n");
}
}
Thanks for any help!