daily pastebin goal
67%
SHARE
TWEET

Untitled

a guest Jan 12th, 2018 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         if((time()-$anciennesDonnees[0])>30 or $new) {  // Choice of the time  
  2.         // Todo : enregistrer pour mettre a jour toutes les minutes.
  3.             $server = new q3status($serv_address, $serv_port);
  4.             $server->update_status();
  5.             if(!$server) { die(); }
  6.            
  7.             $this->players = $server->playerlist;
  8.             $this->map = $server->get_cvar("mapname");
  9.             $this->mode = $server->get_cvar("g_gametype");
  10.             $this->servername = $server->get_cvar("sv_hostname");
  11.             $this->maxclients = $server->get_cvar("sv_maxclients");
  12.             $this->nbPlayers = $server->get_num_players();
  13.             $this->gear = $server->get_cvar("g_gear");
  14.            
  15.             $this->lastRefresh = time();       
  16.             $this->set_fichier($this->address, $this->port, $this->server_export_array());
  17.         }
RAW Paste Data
Top