Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void log_online_players(){
- //every 5 minutes.
- if(max(gametime_to_int() - get_property("_last_online_check").to_int(),get_property("_last_online_check").to_int() - gametime_to_int()) > 300000){
- string[int] online_players;
- file_to_map("online players.txt",online_players);
- set_property("message_index",get_property("message_index").to_int()+1);
- online_players[get_property("message_index").to_int()] = group_string(visit_url("login.php"), "There are currently.*?<b>(\\d+)</b>")[0][1].to_int()+" players logged in at "+gametime_to_int()+" on "+today_to_string();
- print(online_players[get_property("message_index").to_int()]);
- map_to_file(online_players, "online players.txt");
- set_property("_last_online_check",gametime_to_int());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement