Here all you'll need, call this before main and all other functions:
Code:
int mouse_triger =0;
VECTOR temp;
ENTITY* eBall;


Call this in while loop in players code:
Code:
mouse_pos.x = mouse_cursor.x;
mouse_pos.y = mouse_cursor.y;
mouse_for_world();

And here is a function, needs to be right before players action:
Code:
function mouse_for_world ()
{
	if (mouse_left)
	{
		if(mouse_triger)
		{
			temp.x = mouse_pos.x;
			temp.y = mouse_pos.y;
			temp.z = 10000;
			vec_for_screen(temp,camera);
			if (c_trace(camera.x,temp,IGNORE_ME) > 0)
			{
				vec_set(eBall.x,target);
			}
			else
			{
				vec_set(eBall.x,temp);
			}
			mouse_triger = 0;
		}
	}
	else
	{
		mouse_triger = 1;
	}
}


And finaly, you need to create model in main function:
Code:
eBall = ent_create("earth.mdl",vector(25,25,-200),0);

Good luck laugh


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung