Jump to content
MakeWebGames

Please Help. Faction Users Online.


CJ - Twitch

Recommended Posts

First I would like to say I didn't make this! Im just trying to convert it to work with Richards faction mod [v2]

 

function faction_online()
{
echo "<h3>Users Online</h3> ";
$cn=0;
$q=$db->query("SELECT `laston`, `userid`, `username` FROM `users` WHERE `faction`=".$factiondata['faID']." ORDER BY laston DESC");
while($r=$db->fetch_row($q))
{
$la=time()-$r['laston'];
$unit="secs";
if($la >= 60)
{
$la=(int) ($la/60);
$unit="mins";
}
if($la >= 60)
{
$la=(int) ($la/60);
$unit="hours";
if($la >= 24)
{
$la=(int) ($la/24);
$unit="days";
}
}
$cn++;
echo "$cn. [url='viewuser.php?u={$r[']".stripslashes(htmlspecialchars($r['username']))."[/url] ($la $unit)
";
}
}

 

It shows users in your gang that are online. Please give credit to Twisted.

Thanks, CJ.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...