Esempio n. 1
0
 public static function Init()
 {
     echo ">>>> Setting SAMP globals, PHP settings and timers ...\n";
     SetGameModeText('ItalyMafia RPG v3.0');
     AllowInteriorWeapons(1);
     DisableInteriorEnterExits();
     EnableStuntBonusForAll(false);
     AllowAdminTeleport(true);
     AddTimer(array('Core', 'SaveData'), 10000, 1);
     ini_set('max_execution_time', 300);
     echo ">>>> Starting logs ...\n";
     Log::Init();
     echo ">>>> Starting the keybinds manager ...\n";
     Keybinds::Init();
     echo ">>>> Starting the menus manager ...\n";
     Menu::Init();
     echo ">>>> Starting the skins manager ...\n";
     Skins::Init();
     echo ">>>> Starting the animations manager ...\n";
     Animations::Init();
     echo ">>>> Starting locations ...\n";
     Locations::Init();
     echo ">>>> Starting DB engine ...\n";
     DB::Init();
     echo ">>>> Starting houses ...\n";
     Houses::Init();
     echo ">>>> Starting factions ...\n";
     Factions::Init();
     echo ">>>> Starting players manager ...\n";
     Players::Init();
     echo ">>>> Starting vehicles manager ...\n";
     Vehicles::Init();
     echo ">>>> Starting accounts manager ...\n";
     Accounts::Init();
     echo ">>>> Starting messages manager ...\n";
     Messages::Init();
     echo ">>>> Creating the clock ...\n";
     Core::StartClock();
     echo ">>>> Starting gyms ...\n";
     Gym::Init();
     echo ">>>> Starting admins ...\n";
     Admin::Init();
 }
Esempio n. 2
0
 /**
  ** Animation callbacks
  **/
 public static function startExercise(Player $player)
 {
     $draw = Gym::CreateDraw();
     TextDrawShowForPlayer($player->id, $draw);
     Gym::$draws[$player->id] = $draw;
     Gym::ExerciseStep($player, true);
 }
Esempio n. 3
0
    $trainer = Trainer::getById($id);
    sendResponse($trainer->getPokemon());
});
$app->get('/trainers/:id/badges', function ($id) use($app) {
    $trainer = Trainer::getById($id);
    sendResponse($trainer->getBadges());
});
$app->get('/gyms', function () use($app) {
    sendResponse(Gym::getAll());
});
$app->get('/gyms/:id', function ($id) use($app) {
    $gym = Gym::getById($id);
    sendResponse($gym->serialize());
});
$app->get('/gyms/:id/leader', function ($id) use($app) {
    $gym = Gym::getById($id);
    sendResponse($gym->getLeader()->serialize());
});
$app->get('/types', function () use($app) {
    sendResponse(Type::getAll());
});
$app->get('/types/:id', function ($id) use($app) {
    $type = Type::getById($id);
    sendResponse($type->serialize());
});
$app->get('/badges', function () use($app) {
    sendResponse(Badge::getAll());
});
$app->get('/badges/:id', function ($id) use($app) {
    $badge = Badge::getById($id);
    sendResponse($badge->serialize());
Esempio n. 4
0
 public static function search($searchStr)
 {
     $result = Database::query(SQL::searchGyms($searchStr));
     return Gym::gymsForResult($result);
 }