Your links suggest that you have used the sn package (https://cran.r-project.org/web/packages/sn/index.html) though the code you post does not mention it. In what way did sn not work?
Quoting from the sn package documentation -
*"dsn: Skew-Normal Distribution * Description: Density function, distribution function, quantiles and random number generation for the skew-normal (SN) and the extended skew-normal (ESN) distribution."

I'm not sure I understand your problem. What exactly did you expect your result will be with this code? Note that x is not sorted, and you're plotting the points against 1:10000.

Here's an way to plot with ggplot2. I simulated in the range [-5, 5], but you can change as you prefer.

Note that the implementations in the packages fGarch and sn vary.

Actually, I made a sketch to describe clearly and attached.
Black curve has peak at x = .2 but ranges from 0 - 1
Therefore, it got to be skewed to one side.

If you want to generate a distribution that peaks near 0.2 and has most of its density between 0 and 1, the following call to dsn() from the sn package comes close.

library(sn)
X <- seq(-1, 2, 0.01)
plot(X, dsn(X, xi = 0.1, omega = 0.3, alpha = 5), type = "l")
abline(v = 0.2)

^{Created on 2019-09-06 by the reprex package (v0.2.1)}