public static function Init() { /* Register callbacks */ Callbacks::Instance()->Register(cOnPlayerKeyStateChange, null, array('Animations', 'OnPlayerKeyStateChange')); Callbacks::Instance()->Register(cOnPlayerText, null, array('Animations', 'OnPlayerText'), -10); /* Register commands */ CommandHandler::Register('stopanim', 0, null, array('Animations', 'cmdStopanim'), '', 1); /* lib anim loop movex movey continue time forced */ $seat_up = new Animation('PED', 'seat_up', false, false, false, false, -1, false); $seat_idle = new Animation('PED', 'seat_idle', true, false, false, false, -1, false, -1, $seat_up); $seat_down = new Animation('PED', 'seat_down', false, false, false, false, 1350, false, 1200, $seat_up, $seat_idle); Animations::Register('seat', $seat_down); Animations::$seat_animation = $seat_idle; Animations::$stalk_animation = new Animation('MISC', 'seat_talk_01', false, false, false, false, 1800, false, 1600, $seat_up, $seat_idle); $drunkstop = new Animation('PED', 'walk_drunk', true, true, true, false, 100, false); $drunk = new Animation('PED', 'walk_drunk', true, true, true, true, 1, false, -1, $drunkstop); Animations::Register('drunk', $drunk); $fdrunkstop = new Animation('FOOD', 'eat_vomit_p', true, true, true, false, -1, true, 7200); $fdrunk = new Animation('PED', 'walk_drunk', true, true, true, true, 1, true, 5000, null, $fdrunkstop); Animations::Register('fdrunk', $fdrunk); $lay_up = new Animation('SUNBATHE', 'lay_bac_out', false, false, false, false, -1, false); $lay_idle = new Animation('BEACH', 'bather', true, false, false, false, -1, false, -1, $lay_up); $lay_down = new Animation('SUNBATHE', 'lay_bac_in', false, false, false, false, 2100, false, 2000, $lay_up, $lay_idle); Animations::Register('lay', $lay_down); /* Create the textdraw for stopping animations */ Animations::$stopping_draw = TextDrawCreate(214.0, 421.0, 'Use ~r~~k~~PED_SPRINT~~w~ to stop the animation'); TextDrawUseBox(Animations::$stopping_draw, 1); TextDrawBoxColor(Animations::$stopping_draw, 0x66); TextDrawTextSize(Animations::$stopping_draw, 460.0, 0.0); TextDrawAlignment(Animations::$stopping_draw, 0); TextDrawBackgroundColor(Animations::$stopping_draw, 0xff); TextDrawFont(Animations::$stopping_draw, 1); TextDrawLetterSize(Animations::$stopping_draw, 0.399999, 1.3); TextDrawColor(Animations::$stopping_draw, 0xffffffff); TextDrawSetOutline(Animations::$stopping_draw, 1); TextDrawSetProportional(Animations::$stopping_draw, 1); /* Create global animations */ Animations::$death_animation = new Animation('WUZI', 'CS_Dead_Guy', true, false, false, false, -1, true); }