if what you want is create the block in the position of the wall or floor that you clicked change the ent_create line to this:
ent_create("block.mdl",hit.x,NULL);