public static function Init() { /* Register commands and callbacks */ CommandHandler::Register('exercise', 0, null, array('Gym', 'cmdExercise'), '', 1); CommandHandler::Register('stopexercise', 0, null, array('Gym', 'cmdStopexercise'), '', 1); Callbacks::Instance()->Register(cOnPlayerDisconnect, null, array('Gym', 'OnPlayerDisconnect')); Callbacks::Instance()->Register(cOnPlayerKeyStateChange, null, array('Gym', 'OnPlayerKeyStateChange')); Callbacks::Instance()->Register(cOnPlayerSpawn, null, array('Gym', 'OnPlayerSpawn')); /* Create the animations */ $benchpress_getoff = new Animation('benchpress', 'gym_bp_getoff', false, false, false, false, 8100, true); $benchpress_exercise = new Animation('benchpress', 'gym_bp_up_smooth', true, false, false, false, -1, true, -1, $benchpress_getoff); $benchpress_anim = new Animation('benchpress', 'gym_bp_geton', false, false, false, false, 5200, true, 5100, $benchpress_getoff, $benchpress_exercise, array('Gym', 'startExercise')); Gym::$anims['benchpress'] = $benchpress_anim; $bike_getoff = new Animation('gymnasium', 'gym_bike_getoff', false, false, false, false, 1350, true); $bike_exercise = new Animation('gymnasium', 'gym_bike_pedal', true, false, false, false, -1, true, -1, $bike_getoff); $bike_anim = new Animation('gymnasium', 'gym_bike_geton', false, false, false, false, 1500, true, 1400, $bike_getoff, $bike_exercise, array('Gym', 'startExercise')); Gym::$anims['bike'] = $bike_anim; $tread_getoff = new Animation('gymnasium', 'gym_tread_getoff', false, false, false, false, 3000, true); $tread_exercise = new Animation('gymnasium', 'gym_tread_jog', true, false, false, false, -1, true, -1, $tread_getoff); $tread_anim = new Animation('gymnasium', 'gym_tread_geton', false, false, false, false, 2250, true, 2200, $tread_getoff, $tread_exercise, array('Gym', 'startExercise')); Gym::$anims['tread'] = $tread_anim; /* Make the list of keys */ Gym::RegisterKey(KEY_ACTION, 'TAB'); Gym::RegisterKey(KEY_CROUCH, 'CROUCH'); Gym::RegisterKey(KEY_SPRINT, 'SPRINT'); Gym::RegisterKey(KEY_JUMP, 'JUMP'); Gym::RegisterKey(KEY_WALK, 'WALK'); Gym::RegisterKey(KEY_SECONDARY_ATTACK, 'ENTER V.'); /* Initialize arrays */ Gym::$players_key = array_fill(0, MAX_PLAYERS, -1); Gym::$players_gained = array_fill(0, MAX_PLAYERS, -1); Gym::$draws = array_fill(0, MAX_PLAYERS, null); /* Register all exercise machines */ echo ">>>>> Registering all exercise machines locations ...\n"; /* Madd doggs */ Gym::Register('benchpress', new Position(1233.6235, -769.3942, 1084.0, 180), new Position(1233.6235, -767.3942, 1086)); Gym::Register('bike', new Position(1242.4896, -767.7238, 1084.0121, 90), new Position(1239, -766.7238, 1086)); Gym::Register('tread', new Position(1226.5122, -762.5506, 1084.0055, 180), new Position(1226.5352, -768.6758, 1087)); }