• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

if player isOnline

andrew95434

Banned User
Joined
May 6, 2010
Messages
86
Reaction score
0
Location
chile
hi, i have this part of script in modern aac:
<a onmouseover="tooltip.show('<font size=1>
<?php
echo getVocationName($player->vocation) ?></font>',150);" onmouseout="tooltip.hide();" href="<?php echo WEBSITE; ?>/index.php/character/view/<?php echo $player->name; ?>"><strong>
<?php

echo "<font color='green'>$player->name</font>";

?>
</strong></a><br />

and i want to add an if clause before this part:
echo "<font color='green'>$player->name</font>";
to make that when the player is online, the font of the word be green, and when offline it turns red. i tried using this:
if($player->isOnline()) echo "<font color='green'>$player->name</font>";
but it didn't work.

please help!!!
 
it didnt work :(
it shows all the if clause as a text.
i have to invlude this code between "<?php" and "?>"??? i made the code with and without them and it dont work anyway.
 
it didnt work
please see the complete code that i wrote at the first thread, i dont know very much of php. maybe the strong value or the fact that the code that doesnt work is into a href content males that it to not work. i think the code you give me is okay, but when i insert it in the part i need it, it doesnt work.
 
Back
Top