how to generate a cone

Maybe someone has an example of how to generate a cone ? where each of its lines is Fvector (for use in LineTrace and velocity calculation).
I tried to redo the VRandCone function but nothing works, the function always returns random vectors or the same vector.

example of what i need