CJ - Twitch Posted January 22, 2010 Posted January 22, 2010 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.