viewing paste Unknown #18788 | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11
celestiaj,60,71,6   script  Players Online  100,{
    query_sql "SELECT `name`,`last_map` FROM `char` WHERE `online` > 0 ORDER BY `last_map` DESC LIMIT 2", .@names$, .@loc$;
    query_sql "SELECT COUNT(name) FROM `char` WHERE `online` > 0", .@online;
    //if(!.@online) { mes "Нет игроков онлайн."; close; }
    mes "Всего игроков онлайн: "+.@online;
    for(.@i = 0; .@i < getarraysize(.@names$); .@i++) {
        mes "["+(.@i+1)+"] "+.@names$[.@i]+": "+ .@loc$[.@i]+"";
        next;
    }
    close;
}
Viewed 692 times, submitted by Guest.