Ah I was confusing Lite-C with c-script a little, this will work, I tested it

:
Code:
#include <default.c>
////////////////////////////////////////////
var mouse_click[3];
function mouseTo3D(&vect)
{
vec_set (mouse_click, mouse_dir3d);
vec_normalize(mouse_click, 4000);
vec_add (mouse_click, camera.x);
c_trace (camera.x, mouse_click, IGNORE_MODELS);
vec_set (vect.x, target.x);
}
function creat()
{
while (1) //we will always check for user input, every frame
{
if (mouse_left) //left mouse was clicked!
{
you = ent_create("earth.mdl", nullvector, null);
mouseTo3D(you.x);
while (mouse_left) {wait(1);}
}
wait(1);
}
}
function mouse() {
mouse_mode = 2;
while(1)
{
mouse_pos.x = mouse_cursor.x;
mouse_pos.y = mouse_cursor.y;
wait (1);
}
}
function main()
{
level_load("Ent_.wmb");
wait(2);
mouse();
creat();
}