you can use:
c_content(VECTOR* pos,var mode)
Checks the block material at the position given by the vector. The instruction returns a value of CONTENT_EMPTY (1) if empty space, CONTENT_PASSABLE (2) if a passable block, or CONTENT_SOLID (3) if a solid block is detected at the given position. Blocks in the level as well as in map entities are detected - but no other entities. You is set to the entity detected at the position, if any.