コード例 #1
0
        public static void serverCmddismountVehicle(GameConnection client)
        {
            Player  player    = client["player"];
            Vehicle car       = player.getControlObject();
            Player  passenger = car.getMountNodeObject(0);

            ((PlayerData)passenger.getDataBlock()).doDismount(passenger);
            client.setControlObject(player);
        }
コード例 #2
0
        public static void serverCmdflipCar(GameConnection client)
        {
            Player player = client["player"];

            Vehicle car = player.getControlObject();

            if (car.getClassName() != "WheeledVehicle")
            {
                return;
            }
            TransformF carpos = car.getTransform();

            carpos += new TransformF(0, 0, 3);
            car.setTransform(carpos);
        }