* Project name: Battles-Game */ class nick { private $invis; private $user_data; public function __construct($playerId, $showInvisibility = 1) { if (!$this->user_data) { $user = db::c()->query('SELECT `login`, `level`, `hp`, `align`, `klan`, `hp`, `maxhp` FROM `users` WHERE `id` = ?i',$playerId)->fetch_assoc(); $this->user_data = $user; } } public function login(){ // if ($this->invis){ // // db::c()->query('SELECT `time` FROM `effects` WHERE `owner` = ?i AND `type` = ?i', $id, 1022)->fetch_assoc(); // $user['login'] = 'невидимка'; // $user['level'] = 100; // } return $this->user_data; } }