![]() |
|
Script add online players in site - Printable Version +- LCKB (https://lckb.dev/forum) +-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109) +--- Forum: Guides & Help Section (https://lckb.dev/forum/forumdisplay.php?fid=193) +---- Forum: Help & Support (https://lckb.dev/forum/forumdisplay.php?fid=157) +----- Forum: Ep2 Support (https://lckb.dev/forum/forumdisplay.php?fid=166) +------ Forum: Solved Topics (https://lckb.dev/forum/forumdisplay.php?fid=144) +------ Thread: Script add online players in site (/showthread.php?tid=2640) |
- Slash - 11-15-2013 Hello LCKB people , if i say i would add a script online players in my website , can you help me ? - Kotetsu - 11-15-2013 Thats easy, just need to know PHP & Mysql... a_enable=1 in t_users = 1 player online. Select each rows with mysql & use php for convert it to string. - Canton - 11-16-2013 i thought a_enable if player banned or not... xD a_zone > -1 = Player Online - Paramount - 11-16-2013 This question was asked million times.. - GuyFawkes - 11-16-2013 SELECT Count(*) FROM t_users WHERE a_zone_num <> -1; Knock yourself out. - Canton - 11-16-2013 lil example provided that there is already a MySQL connection in your Script $select = "SELECT * FROM t_users WHERE a_zone_num <>-1 ;"; $result = $conn->query($select); if ($result->num_rows > -1) { $online = mysqli_num_rows($result); echo "Online Players : ".$online; } |